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

Class StrCategoryLocator

lib/matplotlib/category.py:119–136  ·  view source on GitHub ↗

Tick at every integer mapping of the string data.

Source from the content-addressed store, hash-verified

117
118
119class StrCategoryLocator(ticker.Locator):
120 """Tick at every integer mapping of the string data."""
121 def __init__(self, units_mapping):
122 """
123 Parameters
124 ----------
125 units_mapping : dict
126 Mapping of category names (str) to indices (int).
127 """
128 self._units = units_mapping
129
130 def __call__(self):
131 # docstring inherited
132 return list(self._units.values())
133
134 def tick_values(self, vmin, vmax):
135 # docstring inherited
136 return self()
137
138
139class StrCategoryFormatter(ticker.Formatter):

Callers 1

axisinfoMethod · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…