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

Function test_grid

lib/matplotlib/tests/test_axes.py:6287–6300  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

6285
6286
6287def test_grid():
6288 fig, ax = plt.subplots()
6289 ax.grid()
6290 fig.canvas.draw()
6291 assert ax.xaxis.majorTicks[0].gridline.get_visible()
6292 ax.grid(visible=False)
6293 fig.canvas.draw()
6294 assert not ax.xaxis.majorTicks[0].gridline.get_visible()
6295 ax.grid(visible=True)
6296 fig.canvas.draw()
6297 assert ax.xaxis.majorTicks[0].gridline.get_visible()
6298 ax.grid()
6299 fig.canvas.draw()
6300 assert not ax.xaxis.majorTicks[0].gridline.get_visible()
6301
6302
6303def test_grid_color_with_alpha():

Callers

nothing calls this directly

Calls 4

subplotsMethod · 0.45
gridMethod · 0.45
drawMethod · 0.45
get_visibleMethod · 0.45

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…