pyexperiment.utils.plot¶
Provides setup utilities for matplotlib figures.
The setup_plotting function will configure basic plot options, such as font size, line width, etc. Calls after the first call are ignored unless the override flag is set to True. The setup_figure function will call setup_plotting without overriding an existing setup, and then return the handle to a new figure, pre-configured with the ‘q’ key bound to close the figure.
The AsyncPlot class provides a simple way to plot some datapoints in a separate process without blocking the execution of the main program. Just create an AsyncPlot object and use the plot method. By default, the window created by the AsyncPlot will stay open until you close it. To close the window programatically, call the close method on the AsyncPlot object.
Written by Peter Duerr.
- class pyexperiment.utils.plot.AsyncPlot(name=u'pyexperiment', labels=None, x_scale=u'linear', y_scale=u'linear')[source][source]¶
Plot asynchronously in a different process
- pyexperiment.utils.plot.quit_figure_on_key(key, figure=None)[source][source]¶
Add handler to figure (defaults to current figure) that closes it on a key press event.