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

Method _set_scale

lib/matplotlib/projections/polar.py:405–414  ·  view source on GitHub ↗
(self, value, **kwargs)

Source from the content-addressed store, hash-verified

403 self._wrap_locator_formatter()
404
405 def _set_scale(self, value, **kwargs):
406 if value != 'linear':
407 raise NotImplementedError(
408 "The xscale cannot be set on a polar plot")
409 super()._set_scale(value, **kwargs)
410 # LinearScale.set_default_locators_and_formatters just set the major
411 # locator to be an AutoLocator, so we customize it here to have ticks
412 # at sensible degree multiples.
413 self.get_major_locator().set_params(steps=[1, 1.5, 3, 4.5, 9, 10])
414 self._wrap_locator_formatter()
415
416 def _copy_tick_props(self, src, dest):
417 """Copy the props from src tick to dest tick."""

Callers

nothing calls this directly

Calls 3

get_major_locatorMethod · 0.80
set_paramsMethod · 0.45

Tested by

no test coverage detected