toyplot.mark module¶
-
class
toyplot.mark.
AxisLines
(coordinate_axes, table, coordinates, stroke, opacity, title, style, annotation)[source]¶ Bases:
toyplot.mark.Mark
Render multiple lines parallel to an axis.
Do not create AxisLines instances directly. Use factory methods such as
toyplot.coordinates.Cartesian.hlines()
andtoyplot.coordinates.Cartesian.vlines()
instead.
-
class
toyplot.mark.
BarBoundaries
(coordinate_axes, table, left, right, boundaries, fill, opacity, title, style, filename)[source]¶ Bases:
toyplot.mark.Mark
Render multiple stacked bars defined by bar boundaries.
Do not create BarBoundaries instances directly. Use factory methods such as
toyplot.bars()
ortoyplot.coordinates.Cartesian.bars()
instead.
-
class
toyplot.mark.
BarMagnitudes
(coordinate_axes, table, left, right, baseline, magnitudes, fill, opacity, title, style, filename)[source]¶ Bases:
toyplot.mark.Mark
Render multiple stacked bars defined by bar magnitudes.
Do not create BarMagnitudes instances directly. Use factory methods such as
toyplot.bars()
ortoyplot.coordinates.Cartesian.bars()
instead.
-
class
toyplot.mark.
FillBoundaries
(coordinate_axes, table, position, boundaries, fill, opacity, title, style, annotation, filename)[source]¶ Bases:
toyplot.mark.Mark
Render multiple stacked fill regions defined by boundaries.
Do not create FillBoundaries instances directly. Use factory methods such as
toyplot.fill()
ortoyplot.coordinates.Cartesian.fill()
instead.
-
class
toyplot.mark.
FillMagnitudes
(coordinate_axes, table, position, baseline, magnitudes, fill, opacity, title, style, annotation, filename)[source]¶ Bases:
toyplot.mark.Mark
Render multiple stacked fill regions defined by magnitudes.
Do not create FillMagnitudes instances directly. Use factory methods such as
toyplot.fill()
ortoyplot.coordinates.Cartesian.fill()
instead.
-
class
toyplot.mark.
Graph
(coordinate_axes, vtable, vid, vlabel, vcoordinates, vmarker, vsize, vcolor, vopacity, vtitle, vstyle, vlstyle, vlshow, etable, esource, etarget, eshape, ecoordinates, ecolor, ewidth, eopacity, estyle)[source]¶ Bases:
toyplot.mark.Mark
Plot a graph (collection of vertices and edges).
Do not create Graph instances directly. Use factory methods such as
toyplot.coordinates.Cartesian.graph()
instead.-
ecoordinates
¶
-
ecount
¶ Return the number of edges in the graph.
-
edges
¶ Return the graph edges as a \(E \times 2\) matrix of source, target indices.
-
eshapes
¶
-
esources
¶
-
etargets
¶
-
vcoordinates
¶ Return the graph vertex coordinates.
-
vcount
¶ Return the number of vertices in the graph.
-
vids
¶ Returns the graph vertex identifiers.
-
-
class
toyplot.mark.
Image
(xmin_range, xmax_range, ymin_range, ymax_range, data)[source]¶ Bases:
toyplot.mark.Mark
Plot a bitmap image.
Do not create Image instances directly. Use factory methods such as
toyplot.image()
andtoyplot.canvas.Canvas.image()
instead.
-
class
toyplot.mark.
Legend
(xmin, xmax, ymin, ymax, entries, style, lstyle)[source]¶ Bases:
toyplot.mark.Mark
Render a figure legend (a collection of markers and labels).
Do not create Legend instances directly. Use factory methods such as
toyplot.canvas.Canvas.legend()
ortoyplot.coordinates.Cartesian.legend()
instead.
-
class
toyplot.mark.
Mark
(annotation=False)[source]¶ Bases:
object
Base class for all Toyplot marks.
-
annotation
¶
-
domain
(axis)[source]¶ Return minimum and maximum domain values for the mark along the given axis.
Parameters: axis (string, required) – Name of an axis along which to return domain values. Returns: - minimum (minimum domain value along the given axis, or None.)
- maximum (maximum domain value along the given axis, or None.)
-
extents
(axes)[source]¶ Return range extents for the mark using the given axes.
Parameters: axes (sequence of strings, required) – Specifies the order in which domain coordinates must be returned. Returns: - coordinates (tuple containing arrays of coordinates, in the order specified by the axes parameter.)
- extents ((left, right, top, bottom) tuple of arrays containing the extents of each datum in range-space, relative to the domain coordinates.)
-
-
class
toyplot.mark.
Plot
(coordinate_axes, table, coordinates, series, stroke, stroke_width, stroke_opacity, stroke_title, marker, msize, mfill, mstroke, mopacity, mtitle, style, mstyle, mlstyle, filename)[source]¶ Bases:
toyplot.mark.Mark
Plot multiple bivariate data series using lines and/or markers.
Do not create Plot instances directly. Use factory methods such as
toyplot.plot()
,toyplot.scatterplot()
,toyplot.coordinates.Cartesian.plot()
andtoyplot.coordinates.Cartesian.scatterplot()
instead.
-
class
toyplot.mark.
Rect
(coordinate_axes, table, left, right, top, bottom, fill, opacity, title, style, filename)[source]¶ Bases:
toyplot.mark.Mark
Plot axis-aligned rectangles.
Do not create Rect instances directly. Use factory methods such as
toyplot.coordinates.Cartesian.rects()
instead.
-
class
toyplot.mark.
Scatterplot
(coordinate_axes, table, coordinates, marker, msize, mfill, mstroke, mopacity, mtitle, style, mstyle, mlstyle, filename)[source]¶ Bases:
toyplot.mark.Mark
Plot multivariate data series using markers.
Do not create Scatterplot instances directly. Use factory methods such as
toyplot.scatterplot()
andtoyplot.coordinates.Cartesian.scatterplot()
instead.
-
class
toyplot.mark.
Text
(coordinate_axes, table, coordinates, text, angle, fill, opacity, title, style, annotation, filename)[source]¶ Bases:
toyplot.mark.Mark
Render text.
Do not create Text instances directly. Use factory methods such as
toyplot.canvas.Canvas.text()
ortoyplot.coordinates.Cartesian.text()
instead.