Plot Tools

Some helper plot functions based on matplotlib. These are just some code snippets that I use regularly and not supposed to be of great merit otherwise.

Install matplotlib and bfmplot to use this module

matplotlib>=3.0.0
bfmplot>=0.1.0
epipack.plottools.plot(t, result, ax=None, curve_label_format='{}', figsize=None)[source]

Plot an epipack result.

Parameters
  • t (numpy.ndarray) -- Sampling times.

  • result (dict) -- Mapping compartments to incidence time series.

  • ax (matplotlib.axis.Axis, default = None) -- The axis on which to plot

  • curve_label_format (str, default = '{}') -- How to display a curve label

  • figsize (tuple, default = None) -- A tuple containing width and height of the figure that's produced

Returns

ax -- The axis on which results were drawn

Return type

matplotlib.axis.Axis

epipack.plottools.strip_axis(ax, horizontal='right')[source]

Remove the right and the top axis