pyvista.plotting.charts.BoxPlot.labels

Contents

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 as pv
>>> chart = pv.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()
../../../../_images/pyvista-plotting-charts-BoxPlot-labels-2_00_00.png

Modify the labels.

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