MCPcopy Create free account
hub / github.com/ColdGrub1384/Pyto / grid

Method grid

site-packages/matplotlib/axis.py:1418–1458  ·  view source on GitHub ↗

Configure the grid lines. Parameters ---------- b : bool or None Whether to show the grid lines. If any *kwargs* are supplied, it is assumed you want the grid on and *b* will be set to True. If *b* is *None* and there are no *kwa

(self, b=None, which='major', **kwargs)

Source from the content-addressed store, hash-verified

1416 return self.minorTicks[:numticks]
1417
1418 def grid(self, b=None, which='major', **kwargs):
1419 """
1420 Configure the grid lines.
1421
1422 Parameters
1423 ----------
1424 b : bool or None
1425 Whether to show the grid lines. If any *kwargs* are supplied,
1426 it is assumed you want the grid on and *b* will be set to True.
1427
1428 If *b* is *None* and there are no *kwargs*, this toggles the
1429 visibility of the lines.
1430
1431 which : {'major', 'minor', 'both'}
1432 The grid lines to apply the changes on.
1433
1434 **kwargs : `.Line2D` properties
1435 Define the line properties of the grid, e.g.::
1436
1437 grid(color='r', linestyle='-', linewidth=2)
1438
1439 """
1440 if len(kwargs):
1441 b = True
1442 which = which.lower()
1443 gridkw = {'grid_' + item[0]: item[1] for item in kwargs.items()}
1444 if which in ['minor', 'both']:
1445 if b is None:
1446 self._gridOnMinor = not self._gridOnMinor
1447 else:
1448 self._gridOnMinor = b
1449 self.set_tick_params(which='minor', gridOn=self._gridOnMinor,
1450 **gridkw)
1451 if which in ['major', 'both']:
1452 if b is None:
1453 self._gridOnMajor = not self._gridOnMajor
1454 else:
1455 self._gridOnMajor = b
1456 self.set_tick_params(which='major', gridOn=self._gridOnMajor,
1457 **gridkw)
1458 self.stale = True
1459
1460 def update_units(self, data):
1461 """

Callers 15

image_demo.pyFile · 0.45
polar_demo.pyFile · 0.45
simple_plot.pyFile · 0.45
path_patch.pyFile · 0.45
date.pyFile · 0.45
triggerMethod · 0.45
gridFunction · 0.45
key_press_handlerFunction · 0.45
_adorn_subplotsMethod · 0.45
boxplotFunction · 0.45
plot_groupFunction · 0.45
scatter_plotFunction · 0.45

Calls 3

set_tick_paramsMethod · 0.95
lowerMethod · 0.80
itemsMethod · 0.45

Tested by

no test coverage detected