pyvista.Chart2D.grid

Contents

pyvista.Chart2D.grid#

property Chart2D.grid[source]#

Enable or disable the chart grid.

Examples

Create a 2D chart with the grid disabled.

>>> import pyvista as pv
>>> import numpy as np
>>> x = np.linspace(0, 2*np.pi, 20)
>>> y = np.sin(x)
>>> chart = pv.Chart2D()
>>> _ = chart.line(x, y, 'r')
>>> chart.grid = False
>>> chart.show()
../../../../_images/pyvista-Chart2D-grid-2_00_00.png

Enable the grid

>>> chart.grid = True
>>> chart.show()
../../../../_images/pyvista-Chart2D-grid-2_01_00.png