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.

property angle

Warning

property ‘toyplot.marker.Marker.angle’ undocumented

intersect(p)[source]

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

Parameters:

p (numpy.ndarray with shape (2), required) – Relative coordinates of a line segment originating at the center of this marker.

Returns:

dp – Relative coordinates of the intersection with this marker’s border.

Return type:

numpy.ndarray with shape (2)

property label

Warning

property ‘toyplot.marker.Marker.label’ undocumented

property lstyle

Warning

property ‘toyplot.marker.Marker.lstyle’ undocumented

property mstyle

Warning

property ‘toyplot.marker.Marker.mstyle’ undocumented

property shape

Warning

property ‘toyplot.marker.Marker.shape’ undocumented

property size

Warning

property ‘toyplot.marker.Marker.size’ undocumented

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.