pyvista.plotting.charts.PiePlot.labels#

property PiePlot.labels[source]#

Return or set the this plot’s labels, as shown in the chart’s legend.

Examples

Create a pie plot.

>>> import pyvista as pv
>>> chart = pv.ChartPie([4, 3, 2, 1])
>>> plot = chart.plot
>>> chart.show()
https://d33wubrfki0l68.cloudfront.net/4d59ed20d1b3eeb4a1fe843d77c285b4fb1f4d77/12925/_images/pyvista-plotting-charts-pieplot-labels-2_00_00.png

Modify the labels.

>>> plot.labels = ["A", "B", "C", "D"]
>>> chart.show()
https://d33wubrfki0l68.cloudfront.net/e9afc7aeb7c03c39d6980f3f71140f302f961141/66677/_images/pyvista-plotting-charts-pieplot-labels-2_01_00.png