deephaven.plot.linestyle#

The module implements the LineStyle class that can be used to define the line style of a plot.

class LineEndStyle(value)[source]#

Bases: Enum

An enum defining styles for shapes drawn at the end of a line.

BUTT = io.deephaven.plot.LineStyle$LineEndStyle(objectRef=0x56020189c282)#

Square line ending with edge against the end data points.

ROUND = io.deephaven.plot.LineStyle$LineEndStyle(objectRef=0x56020189c28a)#

Round end shape.

SQUARE = io.deephaven.plot.LineStyle$LineEndStyle(objectRef=0x56020189c292)#

Square line ending. Similar to BUTT, but overshoots the end data points.

class LineJoinStyle(value)[source]#

Bases: Enum

An enum defining styles for drawing the connections between line segments.

BEVEL = io.deephaven.plot.LineStyle$LineJoinStyle(objectRef=0x56020189c2aa)#

Line joins are flat.

MITER = io.deephaven.plot.LineStyle$LineJoinStyle(objectRef=0x56020189c2b2)#

Line joins are pointed.

ROUND = io.deephaven.plot.LineStyle$LineJoinStyle(objectRef=0x56020189c2ba)#

Line joins are rounded.

class LineStyle(width=1.0, end_style=LineEndStyle.ROUND, join_style=LineJoinStyle.ROUND, dash_pattern=None)[source]#

Bases: JObjectWrapper

A LineStyle object represents the style of a line which includes line thickness, dash patterns, end styles, segment join styles, and dash patterns.

Line thickness is 1 by default. Larger numbers draw thicker lines.

Dash pattern is defined by a list of numbers. If only one value is included in the array, the dash and the gap after the dash will be the same. If more than one value is used in the array, the first value represents the length of the first dash in the line. The next value represents the length of the gap between it and the next dash. Additional values can be added into the array for subsequent dash/gap combinations. For example, the array [20,5] creates a dash pattern with a 20 length dash and a 5 length gap. This pattern is repeated till the end of the line.

Creates a LineStyle object.

Parameters:
  • width (float) – the width of the line, default is 1.0

  • end_style (LineEndStyle) – the end style of the line, default is LineEndStyle.ROUND

  • join_style (LineJoinStyle) – the join style of the line, default is LineJoinStyle.ROUND

  • dash_pattern (List[Number]) – a list of number specifying the dash pattern of the line

Raises:

DHError

j_object_type#

alias of LineStyle