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

Warning

attribute ‘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)
label

Warning

attribute ‘toyplot.marker.Marker.label’ undocumented

lstyle

Warning

attribute ‘toyplot.marker.Marker.lstyle’ undocumented

mstyle

Warning

attribute ‘toyplot.marker.Marker.mstyle’ undocumented

shape

Warning

attribute ‘toyplot.marker.Marker.shape’ undocumented

size

Warning

attribute ‘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.