toyplot.marker module

Functionality for managing markers (shapes used to highlight datums in plots and text).

class toyplot.marker.Marker(shape, mstyle, size, angle, label, lstyle)[source]

Bases: object

Represents the complete specification of a marker’s appearance.

angle
intersect(p)[source]

Compute the intersection between this marker’s border and a line segment.

Parameters:p (numpy 2d vector, required) – Relative coordinates of a line segment originating at the center of this marker.
Returns:Relative coordinates of the intersection with this marker’s border.
Return type:dp (numpy 2d vector)
label
lstyle
mstyle
shape
size
to_html()[source]

Convert a marker specification to HTML markup that can be embedded in rich text.

toyplot.marker.convert(value)[source]

Construct an instance of toyplot.marker.Marker from alternative representations.

toyplot.marker.create(shape=None, mstyle=None, size=None, angle=None, label=None, lstyle=None)[source]

Factory function for creating instances of toyplot.marker.Marker.

toyplot.marker.from_html(html)[source]

Convert a parsed xml.etree.ElementTree representation of a marker to a toyplot.marker.Marker object.