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

Function minortickstoggle

lib/matplotlib/tests/test_ticker.py:1858–1874  ·  view source on GitHub ↗
(xminor, yminor, scale, i)

Source from the content-addressed store, hash-verified

1856 """
1857 fig = plt.figure()
1858 def minortickstoggle(xminor, yminor, scale, i):
1859 ax = fig.add_subplot(2, 2, i)
1860 ax.set_xscale(scale)
1861 ax.set_yscale(scale)
1862 if not xminor and not yminor:
1863 ax.minorticks_off()
1864 if xminor and not yminor:
1865 ax.xaxis.minorticks_on()
1866 ax.yaxis.minorticks_off()
1867 if not xminor and yminor:
1868 ax.xaxis.minorticks_off()
1869 ax.yaxis.minorticks_on()
1870 if xminor and yminor:
1871 ax.minorticks_on()
1872
1873 assert (len(ax.xaxis.get_minor_ticks()) > 0) == xminor
1874 assert (len(ax.yaxis.get_minor_ticks()) > 0) == yminor
1875
1876 scales = ['linear', 'log', 'asinh', 'logit']
1877 for scale in scales:

Callers 1

test_minorticks_toggleFunction · 0.85

Calls 6

add_subplotMethod · 0.80
set_xscaleMethod · 0.80
set_yscaleMethod · 0.45
minorticks_offMethod · 0.45
minorticks_onMethod · 0.45
get_minor_ticksMethod · 0.45

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…