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

Method get_gridlines

lib/matplotlib/axis.py:1494–1509  ·  view source on GitHub ↗

Return this Axis' grid lines as a list of `.Line2D`. .. warning:: Ticks and their constituent parts, including grid lines, are not persistent. Various operations can create, delete, and modify the tick instances; see :ref:`axes-tick-objects`.

(self)

Source from the content-addressed store, hash-verified

1492 self.stale = False
1493
1494 def get_gridlines(self):
1495 """
1496 Return this Axis' grid lines as a list of `.Line2D`.
1497
1498 .. warning::
1499
1500 Ticks and their constituent parts, including grid lines, are not
1501 persistent. Various operations can create, delete, and modify the tick
1502 instances; see :ref:`axes-tick-objects`.
1503
1504 You should generally use `.Axis.set_tick_params` / `.Axis.get_tick_params`
1505 to define and query grid styling; see :ref:`axes-ticks-styling`.
1506 """
1507 ticks = self.get_major_ticks()
1508 return cbook.silent_list('Line2D gridline',
1509 [tick.gridline for tick in ticks])
1510
1511 def set_label(self, s):
1512 """Assigning legend labels is not supported. Raises RuntimeError."""

Callers 2

rgridsFunction · 0.45
set_rgridsMethod · 0.45

Calls 1

get_major_ticksMethod · 0.95

Tested by

no test coverage detected