@@ -265,7 +265,7 @@ def plot_var(self, varname, ax=None, **kwds):
265
265
ax = ax or plt .axes ()
266
266
ax .plot (self .vars [varname ], self .z , ** kwds )
267
267
268
- def plot_grad (self , varname , scale = 1 , return_array = False , abs = False ,
268
+ def plot_grad (self , varname , scale = 1 , return_array = False , absolute = False ,
269
269
ax = None , ** kwds ):
270
270
"""Plot the gradient of a variable.
271
271
@@ -279,7 +279,7 @@ def plot_grad(self, varname, scale=1, return_array=False, abs=False,
279
279
Multiply the gradient by this value.
280
280
return_array : bool
281
281
If `true` will return the gradient array.
282
- abs : bool
282
+ absolute : bool
283
283
Plot the absolute value of `varname`.
284
284
ax : matplotlib.axes, optional
285
285
An existing matplotlib.axes.
@@ -296,7 +296,7 @@ def plot_grad(self, varname, scale=1, return_array=False, abs=False,
296
296
"""
297
297
ax = ax or plt .axes ()
298
298
grad = self .grad (varname )
299
- if abs :
299
+ if abssolute :
300
300
grad = np .abs (grad )
301
301
kwds .setdefault ('label' , 'grad(' + varname + ')' )
302
302
ax .plot (grad * scale , self .z , ** kwds )
@@ -483,7 +483,6 @@ def _v_(self, message, level=1):
483
483
def info (self ):
484
484
"""Display info about the pyGMS object."""
485
485
self ._info_ ()
486
- pass
487
486
488
487
@property
489
488
def xlim (self ):
@@ -1744,7 +1743,7 @@ def plot_topography(self, ax=None):
1744
1743
cmap = afrikakarte (), vmin = vmin , vmax = vmax )
1745
1744
1746
1745
def plot_profile (self , x0 , y0 , x1 , y1 , var = 'T' , num = 100 , ax = None ,
1747
- unit = 'm' , type = 'filled' , xaxis = 'dist' , annotate = False ,
1746
+ unit = 'm' , kind = 'filled' , xaxis = 'dist' , annotate = False ,
1748
1747
** kwds ):
1749
1748
"""Plot a profile.
1750
1749
@@ -1762,7 +1761,7 @@ def plot_profile(self, x0, y0, x1, y1, var='T', num=100, ax=None,
1762
1761
The axis to plot to
1763
1762
unit : {'m', 'km'}
1764
1763
Defines the unit of length.
1765
- type : str
1764
+ kind : str
1766
1765
'filled' for a filled contour plot or 'lines', 'contours' for
1767
1766
contours
1768
1767
xaxis : str
@@ -1772,16 +1771,16 @@ def plot_profile(self, x0, y0, x1, y1, var='T', num=100, ax=None,
1772
1771
If `True` will annotate the contour lines.
1773
1772
kwds : dict
1774
1773
Keywords sent to matplotlib.pyplot.tricontour() or
1775
- matplotlib.pyplot.contourf(), depoending on `type `
1774
+ matplotlib.pyplot.contourf(), depoending on `kind `
1776
1775
1777
1776
Returns
1778
1777
-------
1779
1778
mappable
1780
1779
1781
1780
"""
1782
- valid_types = ['filled' , 'lines' , 'contour' ]
1783
- if type not in valid_types :
1784
- raise ValueError ('Invalid type' , type )
1781
+ valid_kinds = ['filled' , 'lines' , 'contour' ]
1782
+ if kind not in valid_kinds :
1783
+ raise ValueError ('Invalid type' , kind )
1785
1784
1786
1785
length_units = {'km' : 1e-3 , 'm' : 1 }
1787
1786
_ = length_units [unit ]
@@ -1825,9 +1824,9 @@ def plot_profile(self, x0, y0, x1, y1, var='T', num=100, ax=None,
1825
1824
t = tri .Triangulation (d * self .n_layers , z )
1826
1825
1827
1826
# Print the contours
1828
- if type == 'filled' :
1827
+ if kind == 'filled' :
1829
1828
obj = ax .tricontourf (t , v , ** kwds )
1830
- elif type == 'lines' or type == 'contours' :
1829
+ elif kind == 'lines' or kind == 'contours' :
1831
1830
obj = ax .tricontour (t , v , ** kwds )
1832
1831
if annotate :
1833
1832
ax .clabel (obj , colors = 'black' )
0 commit comments