pyvista.Chart2D.size#

property Chart2D.size[source]#

Return or set the chart size in normalized coordinates.

A size of (1, 1) occupies the whole renderer.

Examples

Create a half-sized 2D chart centered in the middle of the renderer.

>>> import pyvista
>>> chart = pyvista.Chart2D()
>>> plot = chart.line([0, 1, 2], [2, 1, 3])
>>> chart.size = (0.5, 0.5)
>>> chart.loc = (0.25, 0.25)
>>> chart.show()
https://d33wubrfki0l68.cloudfront.net/ff28788cfbc0728c98b1858a7f9df4cd2b3548fc/c806e/_images/pyvista-chart2d-size-1_00_00.png