toyplot module¶
Provides the top-level Convenience API, which allows you to create many plots using a single compact statement.
-
toyplot.
bars
(a, b=None, c=None, along='x', baseline='stacked', color=None, opacity=1.0, title=None, style=None, filename=None, xmin=None, xmax=None, ymin=None, ymax=None, show=True, xshow=True, yshow=True, label=None, xlabel=None, ylabel=None, xscale='linear', yscale='linear', padding=10, width=None, height=None)[source]¶ Convenience function for creating a bar plot in a single call.
See
toyplot.coordinates.Cartesian.bars()
,toyplot.canvas.Canvas.axes()
, andtoyplot.canvas.Canvas
for parameter descriptions.Returns: - canvas (
toyplot.canvas.Canvas
) – A new canvas object. - axes (
toyplot.coordinates.Cartesian
) – A new set of 2D axes that fill the canvas. - mark (
toyplot.mark.BarMagnitudes
ortoyplot.mark.BarBoundaries
) – The new bar mark.
- canvas (
-
toyplot.
fill
(a, b=None, c=None, along='x', baseline=None, color=None, opacity=1.0, title=None, style=None, filename=None, xmin=None, xmax=None, ymin=None, ymax=None, show=True, xshow=True, yshow=True, label=None, xlabel=None, ylabel=None, xscale='linear', yscale='linear', padding=10, width=None, height=None)[source]¶ Convenience function for creating a fill plot in a single call.
See
toyplot.coordinates.Cartesian.fill()
,toyplot.canvas.Canvas.axes()
, andtoyplot.canvas.Canvas
for parameter descriptions.Returns: - canvas (
toyplot.canvas.Canvas
) – A new canvas object. - axes (
toyplot.coordinates.Cartesian
) – A new set of 2D axes that fill the canvas. - mark (
toyplot.mark.FillBoundaries
ortoyplot.mark.FillMagnitudes
) – The new bar mark.
- canvas (
-
toyplot.
graph
(a, b=None, c=None, olayout=None, layout=None, along='x', vlabel=None, vcoordinates=None, vcolor=None, vmarker='o', varea=None, vsize=None, vopacity=1.0, vtitle=None, vstyle=None, vlstyle=None, vlshow=True, ecolor=None, ewidth=1.0, eopacity=1.0, estyle=None, padding=20, width=None, height=None)[source]¶ Convenience function for creating a graph plot in a single call.
See
toyplot.coordinates.Cartesian.graph()
,toyplot.canvas.Canvas.axes()
, andtoyplot.canvas.Canvas
for parameter descriptions.Returns: - canvas (
toyplot.canvas.Canvas
) – A new canvas object. - axes (
toyplot.coordinates.Cartesian
) – A new set of 2D axes that fill the canvas. - mark (
toyplot.mark.Graph
) – The new graph mark.
- canvas (
-
toyplot.
image
(data, width=None, height=None)[source]¶ Convenience function for displaying an image in a single call.
See
toyplot.canvas.Canvas.image()
, andtoyplot.canvas.Canvas
for parameter descriptions.Returns: - canvas (
toyplot.canvas.Canvas
) – A new canvas object. - mark (
toyplot.mark.Image
) – The new image mark.
- canvas (
-
toyplot.
matrix
(data, label=None, tlabel=None, llabel=None, rlabel=None, blabel=None, step=1, tshow=None, lshow=None, rshow=None, bshow=None, tlocator=None, llocator=None, rlocator=None, blocator=None, colorshow=False, width=None, height=None, filename=None)[source]¶ Convenience function to create a matrix visualization in a single call.
See
toyplot.canvas.Canvas.matrix()
, andtoyplot.canvas.Canvas
for parameter descriptions.Returns: - canvas (
toyplot.canvas.Canvas
) – A new canvas object. - table (
toyplot.coordinates.Table
) – A new set of table axes that fill the canvas.
- canvas (
-
toyplot.
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, aspect=None, xmin=None, xmax=None, ymin=None, ymax=None, show=True, xshow=True, yshow=True, label=None, xlabel=None, ylabel=None, xscale='linear', yscale='linear', padding=10, width=None, height=None)[source]¶ Convenience function for creating a line plot in a single call.
See
toyplot.coordinates.Cartesian.plot()
,toyplot.canvas.Canvas.axes()
, andtoyplot.canvas.Canvas
for parameter descriptions.Returns: - canvas (
toyplot.canvas.Canvas
) – A new canvas object. - axes (
toyplot.coordinates.Cartesian
) – A new set of 2D axes that fill the canvas. - mark (
toyplot.mark.Plot
) – The new plot mark.
- canvas (
-
toyplot.
scatterplot
(a, b=None, along='x', color=None, marker='o', area=None, size=None, opacity=1.0, title=None, style=None, mstyle=None, mlstyle=None, filename=None, aspect=None, xmin=None, xmax=None, ymin=None, ymax=None, show=True, xshow=True, yshow=True, label=None, xlabel=None, ylabel=None, xscale='linear', yscale='linear', padding=10, width=None, height=None)[source]¶ Convenience function for creating a scatter plot in a single call.
See
toyplot.coordinates.Cartesian.scatterplot()
,toyplot.canvas.Canvas.axes()
, andtoyplot.canvas.Canvas
for parameter descriptions.Returns: - canvas (
toyplot.canvas.Canvas
) – A new canvas object. - axes (
toyplot.coordinates.Cartesian
) – A new set of 2D axes that fill the canvas. - mark (
toyplot.mark.Plot
) – The new scatter plot mark.
- canvas (
-
toyplot.
table
(data=None, rows=None, columns=None, trows=None, brows=None, lcolumns=None, rcolumns=None, label=None, width=None, height=None, filename=None)[source]¶ Convenience function to create a table visualization in a single call.
See
toyplot.canvas.Canvas.table()
, andtoyplot.canvas.Canvas
for parameter descriptions.Returns: - canvas (
toyplot.canvas.Canvas
) – A new canvas object. - table (
toyplot.coordinates.Table
) – A new set of table axes that fill the canvas.
- canvas (