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()
../../../../_images/pyvista-plotting-charts-PiePlot-labels-2_00_00.png

Modify the labels.

>>> plot.labels = ["A", "B", "C", "D"]
>>> chart.show()
../../../../_images/pyvista-plotting-charts-PiePlot-labels-2_01_00.png