MCPcopy Index your code
hub / github.com/matplotlib/matplotlib / convert_yunits

Method convert_yunits

lib/matplotlib/artist.py:289–299  ·  view source on GitHub ↗

Convert *y* using the unit type of the yaxis. If the artist is not contained in an Axes or if the yaxis does not have units, *y* itself is returned.

(self, y)

Source from the content-addressed store, hash-verified

287 return ax.xaxis.convert_units(x)
288
289 def convert_yunits(self, y):
290 """
291 Convert *y* using the unit type of the yaxis.
292
293 If the artist is not contained in an Axes or if the yaxis does not
294 have units, *y* itself is returned.
295 """
296 ax = getattr(self, 'axes', None)
297 if ax is None or ax.yaxis is None:
298 return y
299 return ax.yaxis.convert_units(y)
300
301 @property
302 def axes(self):

Callers 15

drawMethod · 0.80
get_unitless_positionMethod · 0.80
_get_xyMethod · 0.80
_recompute_transformMethod · 0.80
recacheMethod · 0.80
_convert_xy_unitsMethod · 0.80
_convert_unitsMethod · 0.80
_recompute_transformMethod · 0.80
_theta_stretchMethod · 0.80
_prepare_pointsMethod · 0.80
set_offsetsMethod · 0.80

Calls 1

convert_unitsMethod · 0.80

Tested by

no test coverage detected