Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Allow plotting multiple variables of StateMonitor #8

Open
thesamovar opened this issue May 26, 2016 · 0 comments
Open

Allow plotting multiple variables of StateMonitor #8

thesamovar opened this issue May 26, 2016 · 0 comments

Comments

@thesamovar
Copy link
Member

At the moment, plotting a StateMonitor with multiple variables gives an error. It would be nice to plot multiple state variables to a figure with multiple axes (with shared x-axis so zooming in on one zooms on all). You could also imagine having a syntax that allows you to choose which axes are re-used and which are new, e.g. show_variables=[('v', 'vt'), ('I',)] would show v and vt on one axis, and I on another. It could automatically select the correct number of subplots to use to fill the figure.

The problem with this is that at the moment you can specify an axis to plot to, and this would have to allow plotting to multiple axes.

In the past I've written plotting routines for my own use where you can pass an ax and fig argument. If the plotting routine needs multiple axes, you have to pass a fig (or it creates a new one if fig is None). If the plotting routine only needs one axis, you can either pass an ax or fig (if you pass a fig, it will do subplot(111) on that fig). Maybe this scheme would work here?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant