@@ -1358,6 +1358,7 @@ def scatter(self, ax, name, ref=None, factor=1, **kwargs):
1358
1358
:param matplotlib.axes.Axes ax: matplotlib axes use to draw
1359
1359
:param str name: var which will be use to fill contour
1360
1360
:param float,None ref: if define use like west bound
1361
+ :param float factor: multiply value by
1361
1362
:param dict kwargs: look at :py:meth:`matplotlib.axes.Axes.scatter`
1362
1363
:return: scatter mappable
1363
1364
@@ -1377,24 +1378,27 @@ def filled(
1377
1378
lut = 10 ,
1378
1379
vmin = None ,
1379
1380
vmax = None ,
1381
+ factor = 1 ,
1380
1382
** kwargs ,
1381
1383
):
1382
1384
"""
1383
1385
:param matplotlib.axes.Axes ax: matplotlib axes use to draw
1384
- :param str varname: var which will be use to fill contour
1386
+ :param str,array varname: var which will be use to fill contour, or an array of same size of obs
1385
1387
:param bool intern: if True draw speed contour instead of effective contour
1386
1388
:param str cmap: matplotlib colormap name
1387
1389
:param int,None lut: Number of division of colormaps
1388
1390
:param float,None vmin:
1389
1391
:param float,None vmax:
1392
+ :param float factor: multiply value by
1390
1393
:return: Collection drawed
1391
1394
:rtype: matplotlib.collections.PolyCollection
1392
1395
1393
1396
.. minigallery:: py_eddy_tracker.EddiesObservations.filled
1394
1397
"""
1395
1398
cmap = get_cmap (cmap , lut )
1396
1399
x_name , y_name = self .intern (intern )
1397
- x , y , v = self [x_name ], self [y_name ], self [varname ]
1400
+ v = (self [varname ] if isinstance (varname , str ) else varname ) * factor
1401
+ x , y = self [x_name ], self [y_name ]
1398
1402
if vmin is None :
1399
1403
vmin = v .min ()
1400
1404
if vmax is None :
0 commit comments