pypdevsbbl.tracers.PlotTracer module¶
This file contains the tracer that can provide plots of the pypdevsbbl.generic.collectors.
-
class
pypdevsbbl.tracers.PlotTracer.PlotTracer(uid, server, *collectors)[source]¶ Bases:
pypdevsbbl.tracers.BaseTracerPlots data from the provided collectors.
Note
Because of how
matplotlibandpypdevswork, this tracer only seems to be working within a Jupyter notebook.See
src/notebook/PlotTracer.ipynbfor an example on how to do this.Parameters: - uid – A unique identifier for distributed simulation. Will be set automatically.
- server – The server that runs the distributed simulation. Will be set automatically.
- *collectors –
The collectors to plot. This is a pair in the form of
(BaseCollector, Axis)or a triple in the form of(BaseDEVS, Axis, func), whereBaseCollectororBaseDEVSare instances of those classes,Axisamatplotlib.Axesandfunca callable that takes the first two members and plots the data on the axis.Additionally, the tuples/lists may be extended with a thrird/fourth member, which is an additional argument to pass to the plot function. What this is for each collector is described in their docs.