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

Function test_minorticks_on_multi_fig

lib/matplotlib/tests/test_ticker.py:2002–2020  ·  view source on GitHub ↗

Turning on minor gridlines in a multi-Axes Figure that contains more than one boxplot and shares the x-axis should not raise an exception.

()

Source from the content-addressed store, hash-verified

2000
2001
2002def test_minorticks_on_multi_fig():
2003 """
2004 Turning on minor gridlines in a multi-Axes Figure
2005 that contains more than one boxplot and shares the x-axis
2006 should not raise an exception.
2007 """
2008 fig, ax = plt.subplots()
2009
2010 ax.boxplot(np.arange(10), positions=[0])
2011 ax.boxplot(np.arange(10), positions=[0])
2012 ax.boxplot(np.arange(10), positions=[1])
2013
2014 ax.grid(which="major")
2015 ax.grid(which="minor")
2016 ax.minorticks_on()
2017 fig.draw_without_rendering()
2018
2019 assert ax.get_xgridlines()
2020 assert isinstance(ax.xaxis.get_minor_locator(), mpl.ticker.AutoMinorLocator)

Callers

nothing calls this directly

Calls 6

boxplotMethod · 0.80
get_minor_locatorMethod · 0.80
subplotsMethod · 0.45
gridMethod · 0.45
minorticks_onMethod · 0.45

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…