pyvista.plotting.charts.Pen

Contents

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

../../../../_images/ls_0.png

"-"

Solid

../../../../_images/ls_1.png

"--"

Dashed

../../../../_images/ls_2.png

":"

Dotted

../../../../_images/ls_3.png

"-."

Dash-dot

../../../../_images/ls_4.png

"-.."

Dash-dot-dot

../../../../_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.