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.

max

Specify an explicit domain maximum for this axis. By default the implicit domain maximum is computed from visible data.

min

Specify an explicit domain minimum for this axis. By default the implicit domain minimum is computed from visible data.

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.

label

toyplot.coordinates.Axis.InteractiveCoordinatesLabelHelper instance.

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).

show

Set False to disable showing interactive coordinates for this axis.

tick

toyplot.coordinates.Axis.InteractiveCoordinatesTickHelper instance.

class InteractiveCoordinatesLabelHelper[source]

Bases: object

Controls the appearance and behavior of interactive coordinate labels.

show

Warning

attribute ‘toyplot.coordinates.Axis.InteractiveCoordinatesLabelHelper.show’ undocumented

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.

show

Warning

attribute ‘toyplot.coordinates.Axis.InteractiveCoordinatesTickHelper.show’ undocumented

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.

coordinates

toyplot.coordinates.Axis.InteractiveCoordinatesHelper instance.

class LabelHelper(text, style)[source]

Bases: object

Controls the appearance and behavior of an axis label.

location

Warning

attribute ‘toyplot.coordinates.Axis.LabelHelper.location’ undocumented

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

text

The text to be displayed, or None.

class PerTickHelper(allowed)[source]

Bases: object

Controls the appearanace and behavior of individual axis ticks.

class TickProxy(tick, allowed)[source]

Bases: object

Warning

class ‘toyplot.coordinates.Axis.PerTickHelper.TickProxy’ undocumented

style

Warning

attribute ‘toyplot.coordinates.Axis.PerTickHelper.TickProxy.style’ undocumented

styles(values)[source]

Warning

method ‘toyplot.coordinates.Axis.PerTickHelper.styles’ undocumented

class SpineHelper[source]

Bases: object

Controls the appearance and behavior of an axis spine.

position

Warning

attribute ‘toyplot.coordinates.Axis.SpineHelper.position’ undocumented

show

Warning

attribute ‘toyplot.coordinates.Axis.SpineHelper.show’ undocumented

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.

angle

Warning

attribute ‘toyplot.coordinates.Axis.TickLabelsHelper.angle’ undocumented

label

Warning

attribute ‘toyplot.coordinates.Axis.TickLabelsHelper.label’ undocumented

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.
show

Warning

attribute ‘toyplot.coordinates.Axis.TickLabelsHelper.show’ undocumented

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.

far

Specifies the distance from the axis, in the opposite direction as location.

labels

Warning

attribute ‘toyplot.coordinates.Axis.TicksHelper.labels’ undocumented

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).

locator

Warning

attribute ‘toyplot.coordinates.Axis.TicksHelper.locator’ undocumented

near

Specifies the distance from the axis, in the same direction as location.

show

Warning

attribute ‘toyplot.coordinates.Axis.TicksHelper.show’ undocumented

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.

tick

Warning

attribute ‘toyplot.coordinates.Axis.TicksHelper.tick’ undocumented

domain

toyplot.coordinates.Axis.DomainHelper instance.

interactive

toyplot.coordinates.Axis.InteractiveHelper instance.

label

toyplot.coordinates.Axis.LabelHelper instance.

scale

Warning

attribute ‘toyplot.coordinates.Axis.scale’ undocumented

show

Warning

attribute ‘toyplot.coordinates.Axis.show’ undocumented

spine

toyplot.coordinates.Axis.SpineHelper instance.

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.

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

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:toyplot.mark.Mark
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, b, 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:

toyplot.mark.BarBoundaries or toyplot.mark.BarMagnitudes

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:

toyplot.coordinates.Numberline

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, y (array-like series of center coordinates.)
  • rx, 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, b, 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:

toyplot.mark.FillBoundaries or toyplot.mark.FillMagnitudes

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:toyplot.mark.Graph
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:

toyplot.mark.AxisLines

Specify a URI that will be hyperlinked from the axes range.

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, 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:

toyplot.mark.Plot

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:

numpy.ndarray

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, 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:

toyplot.mark.Plot

share(axis='x', hyperlink=None, palette=None, xlabel=None, xmax=None, xmin=None, xscale='linear', xticklocator=None, ylabel=None, ymax=None, ymin=None, yscale='linear', yticklocator=None)[source]

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, xmax, ymin, ymax (float, optional) – Used to explicitly override the axis domain (normally, the domain is implicitly defined by any marks added to the axes).
  • xlabel, ylabel (string, optional) – Human-readable axis labels.
  • xticklocator, yticklocator (toyplot.locator.TickLocator, optional) – Controls the placement and formatting of axis ticks and tick labels.
  • xscale, 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:

toyplot.coordinates.Cartesian

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, 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:

toyplot.mark.Text

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:

toyplot.mark.AxisLines

xmax_range

Warning

attribute ‘toyplot.coordinates.Cartesian.xmax_range’ undocumented

xmin_range

Warning

attribute ‘toyplot.coordinates.Cartesian.xmin_range’ undocumented

ymax_range

Warning

attribute ‘toyplot.coordinates.Cartesian.ymax_range’ undocumented

ymin_range

Warning

attribute ‘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:toyplot.mark.Mark
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

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:

toyplot.mark.Plot

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.

spacing

Control the default distance between data added to the numberline.

The default units are CSS pixels, but you may specify the spacing using any Units you like.

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: toyplot.coordinates.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: toyplot.coordinates.CellMark

Warning

class ‘toyplot.coordinates.Table.CellPlotMark’ undocumented

class CellReference(table, selection)[source]

Bases: object

Warning

class ‘toyplot.coordinates.Table.CellReference’ undocumented

align

Warning

attribute ‘toyplot.coordinates.Table.CellReference.align’ undocumented

angle

Warning

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

data

Warning

attribute ‘toyplot.coordinates.Table.CellReference.data’ undocumented

format

Warning

attribute ‘toyplot.coordinates.Table.CellReference.format’ undocumented

height

Warning

attribute ‘toyplot.coordinates.Table.CellReference.height’ undocumented

Warning

attribute ‘toyplot.coordinates.Table.CellReference.hyperlink’ undocumented

lstyle

Warning

attribute ‘toyplot.coordinates.Table.CellReference.lstyle’ undocumented

merge()[source]

Warning

method ‘toyplot.coordinates.Table.CellReference.merge’ undocumented

show

Warning

attribute ‘toyplot.coordinates.Table.CellReference.show’ undocumented

style

Warning

attribute ‘toyplot.coordinates.Table.CellReference.style’ undocumented

title

Warning

attribute ‘toyplot.coordinates.Table.CellReference.title’ undocumented

width

Warning

attribute ‘toyplot.coordinates.Table.CellReference.width’ undocumented

class ColumnCellReference(table, selection)[source]

Bases: toyplot.coordinates.CellReference

Warning

class ‘toyplot.coordinates.Table.ColumnCellReference’ undocumented

delete()[source]

Warning

method ‘toyplot.coordinates.Table.ColumnCellReference.delete’ undocumented

class DistanceArrayReference(array)[source]

Bases: object

Warning

class ‘toyplot.coordinates.Table.DistanceArrayReference’ undocumented

class EmbeddedCartesian(table, *args, **kwargs)[source]

Bases: toyplot.coordinates.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

columns

Warning

attribute ‘toyplot.coordinates.Table.GapReference.columns’ undocumented

rows

Warning

attribute ‘toyplot.coordinates.Table.GapReference.rows’ undocumented

class GridReference(table, hlines, vlines)[source]

Bases: object

Warning

class ‘toyplot.coordinates.Table.GridReference’ undocumented

hlines

Warning

attribute ‘toyplot.coordinates.Table.GridReference.hlines’ undocumented

separation

Warning

attribute ‘toyplot.coordinates.Table.GridReference.separation’ undocumented

style

Warning

attribute ‘toyplot.coordinates.Table.GridReference.style’ undocumented

vlines

Warning

attribute ‘toyplot.coordinates.Table.GridReference.vlines’ undocumented

class Label(text, style)[source]

Bases: object

Controls the appearance and behavior of the table label.

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.

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

insert(before=None, after=None)[source]

Warning

method ‘toyplot.coordinates.Table.Region.ColumnAccessor.insert’ undocumented

class RowAccessor(region)[source]

Bases: object

Warning

class ‘toyplot.coordinates.Table.Region.RowAccessor’ undocumented

insert(before=None, after=None)[source]

Warning

method ‘toyplot.coordinates.Table.Region.RowAccessor.insert’ undocumented

cell

Warning

attribute ‘toyplot.coordinates.Table.Region.cell’ undocumented

cells

Warning

attribute ‘toyplot.coordinates.Table.Region.cells’ undocumented

column

Warning

attribute ‘toyplot.coordinates.Table.Region.column’ undocumented

gaps

Warning

attribute ‘toyplot.coordinates.Table.Region.gaps’ undocumented

grid

Warning

attribute ‘toyplot.coordinates.Table.Region.grid’ undocumented

row

Warning

attribute ‘toyplot.coordinates.Table.Region.row’ undocumented

shape

Warning

attribute ‘toyplot.coordinates.Table.Region.shape’ undocumented

class RowCellReference(table, selection)[source]

Bases: toyplot.coordinates.CellReference

Warning

class ‘toyplot.coordinates.Table.RowCellReference’ undocumented

delete()[source]

Warning

method ‘toyplot.coordinates.Table.RowCellReference.delete’ undocumented

annotation

Warning

attribute ‘toyplot.coordinates.Table.annotation’ undocumented

body

Warning

attribute ‘toyplot.coordinates.Table.body’ undocumented

bottom

Warning

attribute ‘toyplot.coordinates.Table.bottom’ undocumented

cells

Warning

attribute ‘toyplot.coordinates.Table.cells’ undocumented

label

Warning

attribute ‘toyplot.coordinates.Table.label’ undocumented

left

Warning

attribute ‘toyplot.coordinates.Table.left’ undocumented

right

Warning

attribute ‘toyplot.coordinates.Table.right’ undocumented

shape

Warning

attribute ‘toyplot.coordinates.Table.shape’ undocumented

top

Warning

attribute ‘toyplot.coordinates.Table.top’ undocumented