pyvista.ChartBox.legend

Contents

pyvista.ChartBox.legend#

property ChartBox.legend[source]#

Return the chart’s legend.

Examples

Create a boxplot chart with custom labels and access its legend.

>>> import pyvista as pv
>>> chart = pv.ChartBox([[0, 1, 1, 2, 3, 3, 4]])
>>> chart.plot.label = "Data label"
>>> legend = chart.legend
>>> chart.show()
../../../../_images/pyvista-ChartBox-legend-dd0f43a9f5de4cb9_00_00.png