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

Function test_shared_axis_categorical

lib/matplotlib/tests/test_units.py:230–238  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

228
229
230def test_shared_axis_categorical():
231 # str uses category.StrCategoryConverter
232 d1 = {"a": 1, "b": 2}
233 d2 = {"a": 3, "b": 4}
234 fig, (ax1, ax2) = plt.subplots(1, 2, sharex=True, sharey=True)
235 ax1.plot(d1.keys(), d1.values())
236 ax2.plot(d2.keys(), d2.values())
237 ax1.xaxis.set_units(UnitData(["c", "d"]))
238 assert "c" in ax2.xaxis.get_units()._mapping.keys()
239
240
241def test_explicit_converter():

Callers

nothing calls this directly

Calls 6

UnitDataClass · 0.90
valuesMethod · 0.80
set_unitsMethod · 0.80
get_unitsMethod · 0.80
subplotsMethod · 0.45
plotMethod · 0.45

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…