Series

class spb.series.BaseSeries(*args, **kwargs)[source]

Base class for the data objects containing stuff to be plotted.

Notes

The backend should check if it supports the data series that it’s given. It’s the backend responsibility to know how to use the data series that it’s given.

spb.series.BaseSeries.get_data(self)

Compute and returns the numerical data.

The number of parameters returned by this method depends on the specific instance. If s is the series, make sure to read help(s.get_data) to understand what it returns.

class spb.series.InteractiveSeries(exprs, ranges, *args, **kwargs)[source]

Base class for interactive series, in which the expressions can be either a line, a surface (parametric or not), a vector field, … On top of the usual ranges (x, y or u, v, which must be provided), the expressions can use any number of parameters.

The following class, together with the interactive.py module, makes it possible to easily plot symbolic expressions with interactive widgets.

Once new parameters are available, update them by setting the params attribute with a dictionary with all the necessary parameters. Then, get_data() can be called.

Differently from non-interactive series, only uniform sampling is implemented here.

spb.series.InteractiveSeries.get_data(self)

Compute and returns the numerical data.

The number of parameters returned by this method depends on the specific instance. If s is the series, make sure to read help(s.get_data) to understand what it returns.

InteractiveSeries.params

Get or set the current parameters dictionary.

Parameters
pdict
  • key: symbol associated to the parameter

  • val: the numeric value