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

Method axisinfo

lib/matplotlib/category.py:62–86  ·  view source on GitHub ↗

Set the default axis ticks and labels. Parameters ---------- unit : `.UnitData` object string unit information for value axis : `~matplotlib.axis.Axis` axis for which information is being set .. note:: *axis* is not used

(unit, axis)

Source from the content-addressed store, hash-verified

60
61 @staticmethod
62 def axisinfo(unit, axis):
63 """
64 Set the default axis ticks and labels.
65
66 Parameters
67 ----------
68 unit : `.UnitData`
69 object string unit information for value
70 axis : `~matplotlib.axis.Axis`
71 axis for which information is being set
72
73 .. note:: *axis* is not used
74
75 Returns
76 -------
77 `~matplotlib.units.AxisInfo`
78 Information to support default tick labeling
79
80 """
81 StrCategoryConverter._validate_unit(unit)
82 # locator and formatter take mapping dict because
83 # args need to be pass by reference for updates
84 majloc = StrCategoryLocator(unit._mapping)
85 majfmt = StrCategoryFormatter(unit._mapping)
86 return units.AxisInfo(majloc=majloc, majfmt=majfmt)
87
88 @staticmethod
89 def default_units(data, axis):

Callers

nothing calls this directly

Calls 3

StrCategoryLocatorClass · 0.85
_validate_unitMethod · 0.80

Tested by

no test coverage detected