Sketch¶
Updatable plot using matplotlib.
- class matplotlive.sketch.Sketch(xlim, ylim, ylim_right=None, faster=True)¶
Updatable plot using matplotlib.
- add_line(name, side, *args, **kwargs)¶
Add a line-plot to the left axis.
- Parameters:
name (
str
) – Name to refer to this line, for updates.side (
str
) – Axis to which the line is attached, “left” or “right”.args – Forwarded to
pyplot.plot
.kwargs – Forwarded to
pyplot.plot
.
- Return type:
None
- legend(legend)¶
Add a legend to the plot.
- Parameters:
legend (
Sequence
[str
]) – Legend.- Return type:
None
- redraw()¶
Redraw the entire plot (e.g. after updating axis labels).
- Return type:
None
- reset()¶
Reset the sketch.
- Return type:
None
- update()¶
Update the output figure.
- Return type:
None
- update_line(name, xdata, ydata)¶
Update a previously-added line.
- Parameters:
name (
str
) – Name of the line to update.xdata – New x-axis data.
ydata – New y-axis data.
- Return type:
None