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

Method minorticks_on

lib/matplotlib/axis.py:954–986  ·  view source on GitHub ↗

Display default minor ticks on the Axis, depending on the scale (`~.axis.Axis.get_scale`). Scales use specific minor locators: - log: `~.LogLocator` - symlog: `~.SymmetricalLogLocator` - asinh: `~.AsinhLocator` - logit: `~.LogitLocator`

(self)

Source from the content-addressed store, hash-verified

952 pass
953
954 def minorticks_on(self):
955 """
956 Display default minor ticks on the Axis, depending on the scale
957 (`~.axis.Axis.get_scale`).
958
959 Scales use specific minor locators:
960
961 - log: `~.LogLocator`
962 - symlog: `~.SymmetricalLogLocator`
963 - asinh: `~.AsinhLocator`
964 - logit: `~.LogitLocator`
965 - default: `~.AutoMinorLocator`
966
967 Displaying minor ticks may reduce performance; you may turn them off
968 using `minorticks_off()` if drawing speed is a problem.
969 """
970 scale = self.get_scale()
971 if scale == 'log':
972 s = self._scale
973 self.set_minor_locator(mticker.LogLocator(s.base, s.subs))
974 elif scale == 'symlog':
975 s = self._scale
976 self.set_minor_locator(
977 mticker.SymmetricalLogLocator(s._transform, s.subs))
978 elif scale == 'asinh':
979 s = self._scale
980 self.set_minor_locator(
981 mticker.AsinhLocator(s.linear_width, base=s._base,
982 subs=s._subs))
983 elif scale == 'logit':
984 self.set_minor_locator(mticker.LogitLocator(minor=True))
985 else:
986 self.set_minor_locator(mticker.AutoMinorLocator())
987
988 def minorticks_off(self):
989 """Remove minor ticks from the Axis."""

Callers 4

minorticks_onFunction · 0.45
mri_with_eeg.pyFile · 0.45
multiline.pyFile · 0.45
colorbar_basics.pyFile · 0.45

Calls 2

get_scaleMethod · 0.95
set_minor_locatorMethod · 0.95

Tested by

no test coverage detected