pyvista.plotting.charts.Pen#

class Pen(color='k', width=1, style='-', *, _wrap=None)[source]#

Pythonic wrapper for a VTK Pen, used to draw lines.

Parameters:
colorColorLike, default: “k”

Color of the lines drawn using this pen. Any color parsable by pyvista.Color is allowed.

widthfloat, default: 1

Width of the lines drawn using this pen.

stylestr, default: “-”

Style of the lines drawn using this pen. See Pen.LINE_STYLES for a list of allowed line styles.

Notes

LINE_STYLESdict

Dictionary containing all allowed line styles as its keys.

Line styles#

Style

Description

Example

""

Hidden

https://d33wubrfki0l68.cloudfront.net/a73dd168b06ea7a58fe9de9eed08fcc4236f9aa6/29b7d/_images/ls_0.png

"-"

Solid

https://d33wubrfki0l68.cloudfront.net/6b5fa2450289a1ba0382f9302b5bee5925a6a8fc/1efa2/_images/ls_1.png

"--"

Dashed

https://d33wubrfki0l68.cloudfront.net/258a38624436f48862829ccfa0d17773c87effbb/b5780/_images/ls_2.png

":"

Dotted

https://d33wubrfki0l68.cloudfront.net/b6dc748b435b97d96664812e1d5116d1a6bb2d09/547eb/_images/ls_3.png

"-."

Dash-dot

https://d33wubrfki0l68.cloudfront.net/b4a3dfcde01836ea77562a30dd75cfc664cc0fb2/764ee/_images/ls_4.png

"-.."

Dash-dot-dot

https://d33wubrfki0l68.cloudfront.net/9c73c2d003c06ac41ddc1fa79a9769735f54bebf/b1bc3/_images/ls_5.png

Methods

Attributes

Pen.color

Return or set the pen's color.

Pen.style

Return or set the pen's line style.

Pen.width

Return or set the pen's width.