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)
| 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): |
nothing calls this directly
no test coverage detected