pyvista.ChartMPL.size#

property ChartMPL.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 matplotlib chart centered in the middle of the renderer.

>>> import pyvista as pv
>>> chart = pv.ChartMPL()
>>> plots = chart.figure.axes[0].plot([0, 1, 2], [2, 1, 3])
>>> chart.size = (0.5, 0.5)
>>> chart.loc = (0.25, 0.25)
>>> chart.show()
https://d33wubrfki0l68.cloudfront.net/e5608d1e83bad445571f8c15d97cb924aa21b523/3ed80/_images/pyvista-chartmpl-size-2_01_00.png