toyplot.coordinates module¶
Classes and functions for working with coordinate systems.
- class toyplot.coordinates.Axis(label=None, domain_min=None, domain_max=None, scale='linear', show=True, tick_angle=0, tick_locator=None)[source]¶
Bases:
object
One dimensional axis that can be used to create coordinate systems.
- class DomainHelper(domain_min, domain_max)[source]¶
Bases:
object
Controls domain related behavior for this axis.
- property max¶
Specify an explicit domain maximum for this axis. By default the implicit domain maximum is computed from visible data.
- property min¶
Specify an explicit domain minimum for this axis. By default the implicit domain minimum is computed from visible data.
- property show¶
Control whether the domain should be made visible using the axis spine.
- class InteractiveCoordinatesHelper[source]¶
Bases:
object
Controls the appearance and behavior of interactive coordinates.
- property label¶
toyplot.coordinates.Axis.InteractiveCoordinatesLabelHelper
instance.
- property location¶
Controls the position of interactive coordinates relative to the axis.
Allowed values are “above” (force coordinates to appear above the axis), “below” (the opposite), or None (the default - display interactive coordinates opposite tick labels).
- property show¶
Set False to disable showing interactive coordinates for this axis.
- property tick¶
toyplot.coordinates.Axis.InteractiveCoordinatesTickHelper
instance.
- class InteractiveCoordinatesLabelHelper[source]¶
Bases:
object
Controls the appearance and behavior of interactive coordinate labels.
- property show¶
Warning
property ‘toyplot.coordinates.Axis.InteractiveCoordinatesLabelHelper.show’ undocumented
- property style¶
Dictionary of CSS property-value pairs.
Use the style property to control the text appearance. The following CSS properties are allowed:
alignment-baseline
baseline-shift
fill
fill-opacity
font-size
font-weight
opacity
stroke
stroke-opacity
stroke-width
text-anchor
-toyplot-anchor-shift
Note that when assigning to the style property, the properties you supply are merged with the existing properties.
- class InteractiveCoordinatesTickHelper[source]¶
Bases:
object
Controls the appearance and behavior of interactive coordinate ticks.
- property show¶
Warning
property ‘toyplot.coordinates.Axis.InteractiveCoordinatesTickHelper.show’ undocumented
- property style¶
Dictionary of CSS property-value pairs.
Use the style property to control the appearance of the line. The following CSS properties are allowed:
opacity
stroke
stroke-dasharray
stroke-opacity
stroke-width
Note that when assigning to the style property, the properties you supply are merged with the existing properties.
- class InteractiveHelper[source]¶
Bases:
object
Controls interactive behavior for this axis.
- property coordinates¶
toyplot.coordinates.Axis.InteractiveCoordinatesHelper
instance.
- class LabelHelper(text, style)[source]¶
Bases:
object
Controls the appearance and behavior of an axis label.
- property location¶
Warning
property ‘toyplot.coordinates.Axis.LabelHelper.location’ undocumented
- property offset¶
Specifies the position relative to the axis. Increasing values of offset move the position further away from the axis, whether the location is “above” or “below”.
- Getter
Returns the offset in CSS pixels.
- Setter
Sets the offset using a number, string, or (number, string) tuple. Assumes CSS pixels if units aren’t provided. See Units for details.
- property style¶
Dictionary of CSS property-value pairs.
Use the style property to control the text appearance. The following CSS properties are allowed:
alignment-baseline
baseline-shift
fill
fill-opacity
font-size
font-weight
opacity
stroke
stroke-opacity
stroke-width
text-anchor
-toyplot-anchor-shift
Note that when assigning to the style property, the properties you supply are merged with the existing properties.
- property text¶
The text to be displayed, or None.
- class PerTickHelper(allowed)[source]¶
Bases:
object
Controls the appearanace and behavior of individual axis ticks.
- class SpineHelper[source]¶
Bases:
object
Controls the appearance and behavior of an axis spine.
- property position¶
Warning
property ‘toyplot.coordinates.Axis.SpineHelper.position’ undocumented
- property show¶
Warning
property ‘toyplot.coordinates.Axis.SpineHelper.show’ undocumented
- property style¶
Dictionary of CSS property-value pairs.
Use the style property to control the appearance of the line. The following CSS properties are allowed:
opacity
stroke
stroke-dasharray
stroke-opacity
stroke-width
Note that when assigning to the style property, the properties you supply are merged with the existing properties.
- class TickLabelsHelper(angle)[source]¶
Bases:
object
Controls the appearance and behavior of axis tick labels.
- property angle¶
Warning
property ‘toyplot.coordinates.Axis.TickLabelsHelper.angle’ undocumented
- property label¶
Warning
property ‘toyplot.coordinates.Axis.TickLabelsHelper.label’ undocumented
- property offset¶
Specifies the position relative to the axis. Increasing values of offset move the position further away from the axis, whether the location is “above” or “below”.
- Getter
Returns the offset in CSS pixels.
- Setter
Sets the offset using a number, string, or (number, string) tuple. Assumes CSS pixels if units aren’t provided. See Units for details.
- property show¶
Warning
property ‘toyplot.coordinates.Axis.TickLabelsHelper.show’ undocumented
- property style¶
Dictionary of CSS property-value pairs.
Use the style property to control the text appearance. The following CSS properties are allowed:
alignment-baseline
baseline-shift
fill
fill-opacity
font-size
font-weight
opacity
stroke
stroke-opacity
stroke-width
text-anchor
-toyplot-anchor-shift
Note that when assigning to the style property, the properties you supply are merged with the existing properties.
- class TicksHelper(locator, angle)[source]¶
Bases:
object
Controls the appearance and behavior of axis ticks.
- property far¶
Specifies the distance from the axis, in the opposite direction as location.
- property labels¶
Warning
property ‘toyplot.coordinates.Axis.TicksHelper.labels’ undocumented
- property location¶
Controls the position of ticks (and labels) relative to the axis.
Allowed values are “above” (force labels to appear above the axis), “below” (the opposite), or None (use default, context-sensitive behavior).
- property locator¶
Warning
property ‘toyplot.coordinates.Axis.TicksHelper.locator’ undocumented
- property near¶
Specifies the distance from the axis, in the same direction as location.
- property show¶
Warning
property ‘toyplot.coordinates.Axis.TicksHelper.show’ undocumented
- property style¶
Dictionary of CSS property-value pairs.
Use the style property to control the appearance of the line. The following CSS properties are allowed:
opacity
stroke
stroke-dasharray
stroke-opacity
stroke-width
Note that when assigning to the style property, the properties you supply are merged with the existing properties.
- property tick¶
Warning
property ‘toyplot.coordinates.Axis.TicksHelper.tick’ undocumented
- property domain¶
toyplot.coordinates.Axis.DomainHelper
instance.
- property interactive¶
- property label¶
toyplot.coordinates.Axis.LabelHelper
instance.
- property scale¶
Warning
property ‘toyplot.coordinates.Axis.scale’ undocumented
- property show¶
Warning
property ‘toyplot.coordinates.Axis.show’ undocumented
- property spine¶
toyplot.coordinates.Axis.SpineHelper
instance.
- property ticks¶
toyplot.coordinates.Axis.TicksHelper
instance.
- class toyplot.coordinates.Cartesian(aspect, hyperlink, label, padding, palette, scenegraph, show, xaxis, xlabel, xmax, xmax_range, xmin, xmin_range, xscale, xshow, xticklocator, yaxis, ylabel, ymax, ymax_range, ymin, ymin_range, yscale, yshow, yticklocator)[source]¶
Bases:
object
Standard two-dimensional Cartesian coordinate system.
Do not create Cartesian instances directly. Use factory methods such as
toyplot.canvas.Canvas.cartesian()
instead.- class LabelHelper(text, style)[source]¶
Bases:
object
Controls the appearance and behavior of a Cartesian coordinate system label.
- property offset¶
Specifies the position relative to the axis. Increasing values of offset move the position further away from the axis, whether the location is “above” or “below”.
- Getter
Returns the offset in CSS pixels.
- Setter
Sets the offset using a number, string, or (number, string) tuple. Assumes CSS pixels if units aren’t provided. See Units for details.
- property style¶
Dictionary of CSS property-value pairs.
Use the style property to control the text appearance. The following CSS properties are allowed:
alignment-baseline
baseline-shift
fill
fill-opacity
font-size
font-weight
opacity
stroke
stroke-opacity
stroke-width
text-anchor
-toyplot-anchor-shift
Note that when assigning to the style property, the properties you supply are merged with the existing properties.
- property text¶
The text to be displayed, or None.
- add_mark(mark)[source]¶
Add a mark to the axes.
This is only of use when creating your own custom Toyplot marks. It is not intended for end-users.
Example
To add your own custom mark to a set of axes:
mark = axes.add(MyCustomMark())
- Parameters
mark (
toyplot.mark.Mark
, required) –- Returns
mark
- Return type
- property aspect¶
Control the mapping from domains to ranges.
By default, each axis maps its domain to its range separately, which is what is usually expected from a plot. Sometimes, both axes have the same domain. In this case, it is desirable that both axes are mapped to a consistent range to avoid “squashing” or “stretching” the data. To do so, set aspect to “fit-range”.
- bars(a, b=None, c=None, along='x', baseline='stacked', color=None, filename=None, hyperlink=None, opacity=1.0, style=None, title=None)[source]¶
Add stacked bars to the axes.
This command generates one-or-more series of stacked bars. For convenience, you can call it with many different types of input. To generate a single series of \(M\) bars, pass an optional vector of \(M\) bar positions plus a vector of \(M\) bar magnitudes:
>>> axes.bars(magnitudes) >>> axes.bars(centers, magnitudes) >>> axes.bars(minpos, maxpos, magnitudes)
To generate \(N\) stacked series of \(M\) bars, pass an optional vector of \(M\) bar positions plus an \(M \times N\) matrix of bar magnitudes:
>>> axes.bars(magnitudes) >>> axes.bars(centers, magnitudes) >>> axes.bars(minpos, maxpos, magnitudes)
As a convenience for working with
numpy.histogram()
, you may pass a 2-tuple containing \(M\) counts and \(M+1\) bin edges:>>> axes.bars((counts, edges))
Alternatively, you can generate \(N-1\) stacked series of \(M\) bars by passing an optional vector of \(M\) bar positions plus an \(M \times N\) matrix of bar boundaries:
>>> axes.bars(boundaries, baseline=None) >>> axes.bars(centers, boundaries, baseline=None) >>> axes.bars(minpos, maxpos, boundaries, baseline=None)
- Parameters
a (array-like series data.) –
b (array-like series data.) –
c (array-like series data.) –
along (string, "x" or "y", optional) – Specify “x” (the default) for vertical bars, or “y” for horizontal bars.
baseline (array-like, "stacked", "symmetrical", "wiggle", or None) –
color (array-like set of colors, optional) – Specify a single color for all bars, one color per series, or one color per bar. Color values can be explicit toyplot colors, or scalar values to be mapped to colors using the colormap or palette parameter.
opacity (array-like set of opacities, optional) – Specify a single opacity for all bars, one opacity per series, or one opacity per bar.
title (array-like set of strings, optional) – Specify a single title, one title per series, or one title per bar.
hyperlink (array-like set of strings, optional) – Specify a single hyperlink, one hyperlink per series, or one hyperlink per bar.
style (dict, optional) – Collection of CSS styles to be applied globally.
- Returns
bars
- Return type
- color_scale(colormap, label=None, tick_locator=None, width=10, padding=10)[source]¶
Add a color scale to the axes.
The color scale displays a mapping from scalar values to colors, for the given colormap. Note that the supplied colormap must have an explicitly defined domain (specified when the colormap was created), otherwise the mapping would be undefined.
- Parameters
colormap (
toyplot.color.Map
, required) – Colormap to be displayed.label (string, optional) – Human-readable label placed below the axis.
ticklocator (
toyplot.locator.TickLocator
, optional) – Controls the placement and formatting of axis ticks and tick labels.
- Returns
axes
- Return type
- ellipse(x, y, rx, ry, angle=None, color=None, opacity=1.0, title=None, style=None, filename=None)[source]¶
Add ellipses to the axes.
This command creates a single series of one-or-more ellipses. To create one ellipse, pass scalar values for the center and x and y radiuses:
>>> axes.ellipse(xcenter, ycenter, xradius, yradius)
You may also specify an optional angle, measured in degrees, that will be used to rotate the ellipse counter-clockwise around its center:
>>> axes.ellipse(xcenter, ycenter, xradius, yradius, angle)
To create \(M\) ellipses, pass size-\(M\) vectors for each of the parameters:
>>> axes.ellipse(xcenters, ycenters, xradiuses, yradiuses) >>> axes.ellipse(xcenters, ycenters, xradiuses, yradiuses, angles)
- Parameters
x (array-like series of center coordinates.) –
y (array-like series of center coordinates.) –
rx (array-like series of x and y radiuses.) –
ry (array-like series of x and y radiuses.) –
angle (array-like series of rotation angles, optional.) –
color (array-like series of colors, optional.) – Specify a single color for all ellipses, or one color per ellipse. Color values can be explicit Toyplot colors, scalar values to be mapped to colors with a default colormap, or a (scalar, colormap) tuple containing scalar values to be mapped to colors with the given colormap.
opacity (array-like set of opacities, optional.) – Specify a single opacity for all ellipses, or one opacity per ellipse.
title (array like set of strings, optional.) – Specify a single title for all ellipses, or one title per ellipse.
style (dict, optional) – Collection of CSS styles to be applied to every ellipse.
filename (string, optional) – Specify a default filename to be used if the end-viewer decides to export the plot data.
- Returns
mark
- Return type
toyplot.mark.Ellipse
containing the mark data.
- fill(a, b=None, c=None, along='x', baseline=None, color=None, opacity=1.0, title=None, style=None, annotation=False, filename=None)[source]¶
Fill multiple regions separated by curves.
- Parameters
a (array-like sets of coordinates) – If a, b, and c are provided, they specify the X coordinates, bottom coordinates, and top coordinates of the region respectively. If only a and b are provided, they specify the X coordinates and top coordinates, with the bottom coordinates lying on the X axis. If only a is provided, it specifies the top coordinates, with the bottom coordinates lying on the X axis and the X coordinates ranging from [0, N).
b (array-like sets of coordinates) – If a, b, and c are provided, they specify the X coordinates, bottom coordinates, and top coordinates of the region respectively. If only a and b are provided, they specify the X coordinates and top coordinates, with the bottom coordinates lying on the X axis. If only a is provided, it specifies the top coordinates, with the bottom coordinates lying on the X axis and the X coordinates ranging from [0, N).
c (array-like sets of coordinates) – If a, b, and c are provided, they specify the X coordinates, bottom coordinates, and top coordinates of the region respectively. If only a and b are provided, they specify the X coordinates and top coordinates, with the bottom coordinates lying on the X axis. If only a is provided, it specifies the top coordinates, with the bottom coordinates lying on the X axis and the X coordinates ranging from [0, N).
title (string, optional) – Human-readable title for the mark. The SVG / HTML backends render the title as a tooltip.
style (dict, optional) – Collection of CSS styles to apply to the mark. See
toyplot.mark.FillBoundaries
for a list of useful styles.annotation (boolean, optional) – Set to True if this mark should be considered an annotation.
- Returns
mark
- Return type
- graph(a, b=None, c=None, olayout=None, layout=None, along='x', ecolor=None, efilename=None, eopacity=1.0, estyle=None, ewidth=1.0, hmarker=None, mmarker=None, mposition=0.5, tmarker=None, varea=None, vcolor=None, vcoordinates=None, vfilename=None, vlabel=None, vlshow=True, vlstyle=None, vmarker='o', vopacity=1.0, vsize=None, vstyle=None, vtitle=None)[source]¶
Add a graph plot to the axes.
- Returns
plot
- Return type
- hlines(y, color=None, opacity=1.0, title=None, style=None, annotation=True)[source]¶
Add horizontal line(s) to the axes.
Horizontal lines are convenient because they’re guaranteed to fill the axes from left to right regardless of the axes size.
- Parameters
y (array-like set of Y coordinates) – One horizontal line will be drawn through each Y coordinate provided.
title (string, optional) – Human-readable title for the mark. The SVG / HTML backends render the title as a tooltip.
style (dict, optional) – Collection of CSS styles to apply to the mark. See
toyplot.mark.AxisLines
for a list of useful styles.annotation (boolean, optional) – Set to True if this mark should be considered an annotation.
- Returns
hlines
- Return type
- property hyperlink¶
Specify a URI that will be hyperlinked from the axes range.
- property padding¶
Control the default distance between axis spines and data.
By default, axis spines are offset slightly from the data, to avoid visual clutter and overlap. Use padding to change this offset. The default units are CSS pixels, but you may specify the padding using any Units you like.
- plot(a, b=None, along='x', color=None, stroke_width=2.0, opacity=1.0, title=None, marker=None, area=None, size=None, mfill=None, mopacity=1.0, mtitle=None, style=None, mstyle=None, mlstyle=None, filename=None)[source]¶
Add bivariate line plots to the axes.
- Parameters
a (array-like sets of coordinates) – If a and b are provided, they specify the first and second coordinates respectively of each point in the plot. If only a is provided, it provides second coordinates, and the first coordinates will range from [0, N).
b (array-like sets of coordinates) – If a and b are provided, they specify the first and second coordinates respectively of each point in the plot. If only a is provided, it provides second coordinates, and the first coordinates will range from [0, N).
along (string, optional) – Controls the mapping from coordinates to axes. When set to “x” (the default), first and second coordinates map to the X and Y axes. When set to “y”, the coordinates are reversed.
color (array-like, optional) – Overrides the default per-series colors provided by the axis palette. Specify one color, or one-color-per-series. Colors may be CSS colors, toyplot colors, or scalar values that will be mapped to colors using colormap or palette.
stroke_width (array-like, optional) – Overrides the default stroke width of the plots. Specify one width in drawing units, or one-width-per-series.
stroke_opacity (array-like, optional) – Overrides the default opacity of the plots. Specify one opacity, or one-opacity-per-series.
marker (array-like, optional) – Allows markers to be rendered for each plot datum. Specify one marker, one-marker-per-series, or one-marker-per-datum. Markers can use the string marker type as a shortcut, or a full marker specification.
size (array-like, optional) – Controls marker sizes. Specify one size, one-size-per-series, or one-size-per-datum.
fill (array-like, optional) – Override the fill color for markers, which defaults to the per-series color specified by color. Specify one color, one-color-per-series, or one-color-per-datum. Colors may be CSS colors, toyplot colors, or scalar values that will be mapped to colors using fill_colormap or fill_palette.
opacity (array-like, optional) – Overrides the default opacity of the markers. Specify one opacity, one-opacity-per-series, or one-opacity-per-datum.
title (array-like, optional) – Human-readable title for the data series. The SVG / HTML backends render the title using tooltips. Specify one title or one-title-per-series.
style (dict, optional) – Collection of CSS styles applied to all plots.
mstyle (dict, optional) – Collection of CSS styles applied to all markers.
mlstyle (dict, optional) – Collection of CSS styles applied to all marker labels.
- Returns
mark
- Return type
- project(axis, values)[source]¶
Project a set of domain values to coordinate system range values.
Note that this API is intended for advanced users creating their own custom marks, end-users should never need to use it.
- Parameters
axis ("x" or "y", required) – The axis to be projected
values (array-like, required) – The values to be projected
- Returns
projected – The projected values.
- Return type
- rectangle(a, b, c, d, along='x', color=None, filename=None, opacity=1.0, style=None, title=None)[source]¶
Warning
method ‘toyplot.coordinates.Cartesian.rectangle’ undocumented
- scatterplot(a, b=None, along='x', area=None, color=None, filename=None, hyperlink=None, marker='o', mlstyle=None, mstyle=None, opacity=1.0, size=None, title=None)[source]¶
Add a bivariate plot to the axes.
- Parameters
a (array-like sets of coordinates) – If a and b are provided, they specify the X coordinates and Y coordinates of each point in the plot. If only a is provided, it specifies the Y coordinates, and the X coordinates will range from [0, N).
b (array-like sets of coordinates) – If a and b are provided, they specify the X coordinates and Y coordinates of each point in the plot. If only a is provided, it specifies the Y coordinates, and the X coordinates will range from [0, N).
title (string, optional) – Human-readable title for the mark. The SVG / HTML backends render the title as a tooltip.
style (dict, optional) – Collection of CSS styles to apply across all datums.
- Returns
plot
- Return type
Create a Cartesian coordinate system with a shared axis.
- Parameters
axis (string, optional) – The axis that will be shared. Allowed values are “x” and “y”.
xmin (float, optional) – Used to explicitly override the axis domain (normally, the domain is implicitly defined by any marks added to the axes).
xmax (float, optional) – Used to explicitly override the axis domain (normally, the domain is implicitly defined by any marks added to the axes).
ymin (float, optional) – Used to explicitly override the axis domain (normally, the domain is implicitly defined by any marks added to the axes).
ymax (float, optional) – Used to explicitly override the axis domain (normally, the domain is implicitly defined by any marks added to the axes).
xlabel (string, optional) – Human-readable axis labels.
ylabel (string, optional) – Human-readable axis labels.
xticklocator (
toyplot.locator.TickLocator
, optional) – Controls the placement and formatting of axis ticks and tick labels.yticklocator (
toyplot.locator.TickLocator
, optional) – Controls the placement and formatting of axis ticks and tick labels.xscale ("linear", "log", "log10", "log2", or a ("log", <base>) tuple, optional) – Specifies the mapping from data to canvas coordinates along an axis.
yscale ("linear", "log", "log10", "log2", or a ("log", <base>) tuple, optional) – Specifies the mapping from data to canvas coordinates along an axis.
- Returns
axes
- Return type
- property show¶
Control axis visibility.
Use the show property to hide all visible parts of the axes: labels, spines, ticks, tick labels, etc. Note that this does not affect visibility of the axes contents, just the axes themselves.
- text(a, b, text, angle=0, color=None, opacity=1.0, title=None, style=None, filename=None, annotation=True)[source]¶
Add text to the axes.
- Parameters
a (float) – Coordinates of the text anchor.
b (float) – Coordinates of the text anchor.
text (string) – The text to be displayed.
title (string, optional) – Human-readable title for the mark. The SVG / HTML backends render the title as a tooltip.
style (dict, optional) – Collection of CSS styles to apply to the mark. See
toyplot.mark.Text
for a list of useful styles.annotation (boolean, optional) – Set to True if this mark should be considered an annotation.
- Returns
text
- Return type
- vlines(x, color=None, opacity=1.0, title=None, style=None, annotation=True)[source]¶
Add vertical line(s) to the axes.
Vertical lines are convenient because they’re guaranteed to fill the axes from top to bottom regardless of the axes size.
- Parameters
x (array-like set of X coordinates) – One vertical line will be drawn through each X coordinate provided.
title (string, optional) – Human-readable title for the mark. The SVG / HTML backends render the title as a tooltip.
style (dict, optional) – Collection of CSS styles to apply to the mark. See
toyplot.mark.AxisLines
for a list of useful styles.annotation (boolean, optional) – Set to True if this mark should be considered an annotation.
- Returns
mark
- Return type
- property xmax_range¶
Warning
property ‘toyplot.coordinates.Cartesian.xmax_range’ undocumented
- property xmin_range¶
Warning
property ‘toyplot.coordinates.Cartesian.xmin_range’ undocumented
- property ymax_range¶
Warning
property ‘toyplot.coordinates.Cartesian.ymax_range’ undocumented
- property ymin_range¶
Warning
property ‘toyplot.coordinates.Cartesian.ymin_range’ undocumented
- class toyplot.coordinates.Numberline(x1, y1, x2, y2, padding, palette, spacing, min, max, show, label, ticklocator, scale, scenegraph)[source]¶
Bases:
object
Standard one-dimensional coordinate system / numberline.
Do not create Numberline instances directly. Use factory methods such as
toyplot.canvas.Canvas.numberline()
instead.- add_mark(mark)[source]¶
Add a mark to the axes.
This is only of use when creating your own custom Toyplot marks. It is not intended for end-users.
Example
To add your own custom mark to a set of axes:
mark = axes.add(MyCustomMark())
- Parameters
mark (
toyplot.mark.Mark
, required) –- Returns
mark
- Return type
- property axis¶
toyplot.coordinates.Axis
instance that provides the numberline coordinate system.
- colormap(colormap, offset=None, width=10, style=None)[source]¶
Warning
method ‘toyplot.coordinates.Numberline.colormap’ undocumented
- property padding¶
Control the default distance between the axis spine and data.
By default, the axis spine is offset slightly from the data, to avoid visual clutter and overlap. Use padding to change this offset. The default units are CSS pixels, but you may specify the padding using any Units you like.
- range(start, end, color=None, filename=None, offset=None, opacity=1.0, style=None, title=None, width=10)[source]¶
Warning
method ‘toyplot.coordinates.Numberline.range’ undocumented
- scatterplot(coordinates, area=None, color=None, filename=None, hyperlink=None, marker='o', mlstyle=None, mstyle=None, offset=None, opacity=1.0, size=None, title=None)[source]¶
Add a univariate plot to the axes.
- Parameters
coordinate (array-like one-dimensional coordinates) –
title (string, optional) – Human-readable title for the mark. The SVG / HTML backends render the title as a tooltip.
style (dict, optional) – Collection of CSS styles to apply across all datums.
- Returns
plot
- Return type
- property show¶
Control axis visibility.
Use the show property to hide all visible parts of the axis: label, spine, ticks, tick labels, etc. Note that this does not affect visibility of the numberline contents, just the axis.
- class toyplot.coordinates.Table(xmin_range, xmax_range, ymin_range, ymax_range, rows, columns, trows, brows, lcolumns, rcolumns, label, scenegraph, annotation, filename)[source]¶
Bases:
object
Row and column-based table coordinate system.
Do not create Table instances directly. Use factory methods such as
toyplot.canvas.Canvas.table()
instead.- class CellBarMark(table, axes, baseline, color, filename, opacity, padding, series, style, title, width)[source]¶
Bases:
CellMark
Warning
class ‘toyplot.coordinates.Table.CellBarMark’ undocumented
- class CellMark(table, axes, series)[source]¶
Bases:
object
Abstract interface for objects that embed other Toyplot visualizations in table cells.
- class CellPlotMark(table, axes, area, color, filename, marker, mfill, mlstyle, mopacity, mstyle, mtitle, opacity, series, size, stroke_width, style, title)[source]¶
Bases:
CellMark
Warning
class ‘toyplot.coordinates.Table.CellPlotMark’ undocumented
- class CellReference(table, selection)[source]¶
Bases:
object
Warning
class ‘toyplot.coordinates.Table.CellReference’ undocumented
- property align¶
Warning
property ‘toyplot.coordinates.Table.CellReference.align’ undocumented
- property angle¶
Warning
property ‘toyplot.coordinates.Table.CellReference.angle’ undocumented
- cartesian(aspect=None, hyperlink=None, cell_padding=3, label=None, padding=3, palette=None, show=True, xlabel=None, xmax=None, xmin=None, xscale='linear', xshow=False, xticklocator=None, ylabel=None, ymax=None, ymin=None, yscale='linear', yshow=False, yticklocator=None)[source]¶
Warning
method ‘toyplot.coordinates.Table.CellReference.cartesian’ undocumented
- property data¶
Warning
property ‘toyplot.coordinates.Table.CellReference.data’ undocumented
- property format¶
Warning
property ‘toyplot.coordinates.Table.CellReference.format’ undocumented
- property height¶
Warning
property ‘toyplot.coordinates.Table.CellReference.height’ undocumented
- property hyperlink¶
Warning
property ‘toyplot.coordinates.Table.CellReference.hyperlink’ undocumented
- property lstyle¶
Warning
property ‘toyplot.coordinates.Table.CellReference.lstyle’ undocumented
- property show¶
Warning
property ‘toyplot.coordinates.Table.CellReference.show’ undocumented
- property style¶
Warning
property ‘toyplot.coordinates.Table.CellReference.style’ undocumented
- property title¶
Warning
property ‘toyplot.coordinates.Table.CellReference.title’ undocumented
- property width¶
Warning
property ‘toyplot.coordinates.Table.CellReference.width’ undocumented
- class ColumnCellReference(table, selection)[source]¶
Bases:
CellReference
Warning
class ‘toyplot.coordinates.Table.ColumnCellReference’ undocumented
- class DistanceArrayReference(array)[source]¶
Bases:
object
Warning
class ‘toyplot.coordinates.Table.DistanceArrayReference’ undocumented
- class EmbeddedCartesian(table, *args, **kwargs)[source]¶
Bases:
Cartesian
Warning
class ‘toyplot.coordinates.Table.EmbeddedCartesian’ undocumented
- cell_bars(baseline='stacked', color=None, filename=None, opacity=1.0, padding=0, series='columns', style=None, title=None, width=0.5)[source]¶
Warning
method ‘toyplot.coordinates.Table.EmbeddedCartesian.cell_bars’ undocumented
- cell_plot(area=None, color=None, filename=None, marker=None, mfill=None, mlstyle=None, mopacity=1.0, mstyle=None, mtitle=None, opacity=1.0, series='columns', size=None, stroke_width=2.0, style=None, title=None)[source]¶
Warning
method ‘toyplot.coordinates.Table.EmbeddedCartesian.cell_plot’ undocumented
- class GapReference(row_gaps, column_gaps)[source]¶
Bases:
object
Warning
class ‘toyplot.coordinates.Table.GapReference’ undocumented
- property columns¶
Warning
property ‘toyplot.coordinates.Table.GapReference.columns’ undocumented
- property rows¶
Warning
property ‘toyplot.coordinates.Table.GapReference.rows’ undocumented
- class GridReference(table, hlines, vlines)[source]¶
Bases:
object
Warning
class ‘toyplot.coordinates.Table.GridReference’ undocumented
- property hlines¶
Warning
property ‘toyplot.coordinates.Table.GridReference.hlines’ undocumented
- property separation¶
Warning
property ‘toyplot.coordinates.Table.GridReference.separation’ undocumented
- property style¶
Warning
property ‘toyplot.coordinates.Table.GridReference.style’ undocumented
- property vlines¶
Warning
property ‘toyplot.coordinates.Table.GridReference.vlines’ undocumented
- class Label(text, style)[source]¶
Bases:
object
Controls the appearance and behavior of the table label.
- property style¶
Dictionary of CSS property-value pairs.
Use the style property to control the text appearance. The following CSS properties are allowed:
alignment-baseline
baseline-shift
fill
fill-opacity
font-size
font-weight
opacity
stroke
stroke-opacity
stroke-width
text-anchor
-toyplot-anchor-shift
Note that when assigning to the style property, the properties you supply are merged with the existing properties.
- property text¶
The text to be displayed, or None.
- class Region(table, row_begin, row_end, column_begin, column_end)[source]¶
Bases:
object
Warning
class ‘toyplot.coordinates.Table.Region’ undocumented
- class CellAccessor(region)[source]¶
Bases:
object
Warning
class ‘toyplot.coordinates.Table.Region.CellAccessor’ undocumented
- class ColumnAccessor(region)[source]¶
Bases:
object
Warning
class ‘toyplot.coordinates.Table.Region.ColumnAccessor’ undocumented
- class RowAccessor(region)[source]¶
Bases:
object
Warning
class ‘toyplot.coordinates.Table.Region.RowAccessor’ undocumented
- property cell¶
Warning
property ‘toyplot.coordinates.Table.Region.cell’ undocumented
- property cells¶
Warning
property ‘toyplot.coordinates.Table.Region.cells’ undocumented
- property column¶
Warning
property ‘toyplot.coordinates.Table.Region.column’ undocumented
- property gaps¶
Warning
property ‘toyplot.coordinates.Table.Region.gaps’ undocumented
- property grid¶
Warning
property ‘toyplot.coordinates.Table.Region.grid’ undocumented
- property row¶
Warning
property ‘toyplot.coordinates.Table.Region.row’ undocumented
- property shape¶
Warning
property ‘toyplot.coordinates.Table.Region.shape’ undocumented
- class RowCellReference(table, selection)[source]¶
Bases:
CellReference
Warning
class ‘toyplot.coordinates.Table.RowCellReference’ undocumented
- property annotation¶
Warning
property ‘toyplot.coordinates.Table.annotation’ undocumented
- property body¶
Warning
property ‘toyplot.coordinates.Table.body’ undocumented
- property bottom¶
Warning
property ‘toyplot.coordinates.Table.bottom’ undocumented
- property cells¶
Warning
property ‘toyplot.coordinates.Table.cells’ undocumented
- property label¶
Warning
property ‘toyplot.coordinates.Table.label’ undocumented
- property left¶
Warning
property ‘toyplot.coordinates.Table.left’ undocumented
- property right¶
Warning
property ‘toyplot.coordinates.Table.right’ undocumented
- property shape¶
Warning
property ‘toyplot.coordinates.Table.shape’ undocumented
- property top¶
Warning
property ‘toyplot.coordinates.Table.top’ undocumented