Link Search Menu Expand Document

Plot

The plot type is the most basic type. It able to plot a set of X and Y values. The plotted points are linked using lines.

Parameters

Parameter Description
marker The marker to display at the data coordinates.

Example

from plotter import Plotter, PlotterType

to_plot = [
    {
        "type": PlotterType.PLOT,
        "data": [[0,1,2,3,4,5], [15,6,5,3,5,8]]
    }
]

pl = Plotter(to_plot)
pl.show()

Result

Minimal parameters plot

Markers

It is possible to add markers to the plot to highlight the points using the marker parameter. The possible values for the markers are the one supported by Matplotlib (see doc).

Example

from plotter import Plotter, PlotterType

to_plot = [
    {
        "type": PlotterType.PLOT,
        "data": [[0,1,2,3,4,5], [15,6,5,3,5,8]],
        "marker": "-o"
    }
]

pl = Plotter(to_plot)
pl.show()

Result

Plot with markers

Multiple plots on the same figure

For plotting several plots on the same figure see multiplot.


Copyright © Thomas Trouchkine. Distributed by an MIT license.