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

Method grid

lib/mpl_toolkits/axisartist/axislines.py:423–439  ·  view source on GitHub ↗

Toggle the gridlines, and optionally set the properties of the lines.

(self, visible=None, which='major', axis="both", **kwargs)

Source from the content-addressed store, hash-verified

421 return self._grid_helper
422
423 def grid(self, visible=None, which='major', axis="both", **kwargs):
424 """
425 Toggle the gridlines, and optionally set the properties of the lines.
426 """
427 # There are some discrepancies in the behavior of grid() between
428 # axes_grid and Matplotlib, because axes_grid explicitly sets the
429 # visibility of the gridlines.
430 super().grid(visible, which=which, axis=axis, **kwargs)
431 if not self._axisline_on:
432 return
433 if visible is None:
434 visible = (self.axes.xaxis._minor_tick_kw["gridOn"]
435 or self.axes.xaxis._major_tick_kw["gridOn"]
436 or self.axes.yaxis._minor_tick_kw["gridOn"]
437 or self.axes.yaxis._major_tick_kw["gridOn"])
438 self.gridlines.set(which=which, axis=axis, visible=visible)
439 self.gridlines.set(**kwargs)
440
441 def get_children(self):
442 if self._axisline_on:

Callers 6

psdMethod · 0.95
csdMethod · 0.95
cohereMethod · 0.95
test_custom_transformFunction · 0.45
test_polar_boxFunction · 0.45
test_axis_directionFunction · 0.45

Calls 1

setMethod · 0.45

Tested by 3

test_custom_transformFunction · 0.36
test_polar_boxFunction · 0.36
test_axis_directionFunction · 0.36