pyvista.plotting.charts.BoxPlot.labels#

property BoxPlot.labels[source]#

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

Examples

Create a box plot.

>>> import pyvista
>>> chart = pyvista.ChartBox([[0, 1, 1, 2, 3, 4, 5], [0, 1, 2, 2, 3, 4, 5], [0, 1, 2, 3, 3, 4, 5], [0, 1, 2, 3, 4, 4, 5]])
>>> plot = chart.plot
>>> chart.show()
https://d33wubrfki0l68.cloudfront.net/d67de9135851855b3797881f1a66937e3b40fa8c/79738/_images/pyvista-plotting-charts-boxplot-labels-1_00_00.png

Modify the labels.

>>> plot.labels = ["A", "B", "C", "D"]
>>> chart.show()
https://d33wubrfki0l68.cloudfront.net/1957925d6f725c4b90713cfd851e4d242b4b970b/89721/_images/pyvista-plotting-charts-boxplot-labels-1_01_00.png