We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
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
two quick sketches for how to make use of multiple LivePlots in one scan:
LivePlots
from functools import partial from ophyd.sim import hw as _hw from bluesky import RunEngine from bluesky.plans import scan from bluesky.callbacks.mpl_plotting import LivePlot import bluesky.callbacks import bluesky.preprocessors as bpp hw = _hw() bluesky.callbacks.mpl_plotting.initialize_qt_teleporter() RE = RunEngine({}) def same_axes(): def get_ax(): import matplotlib.pyplot as plt return plt.figure('my plot').gca() lt = LivePlot('det', 'motor', marker='x', markersize=10, ax=get_ax) lt2 = LivePlot('det1', 'motor', marker='o', markersize=10, ax=get_ax) return (yield from bpp.subs_wrapper(scan([hw.det, hw.det1], hw.motor, -5, 5, 30), [lt, lt2])) def same_figure(): def get_ax(i): import matplotlib.pyplot as plt fig = plt.figure('my plot') if len(fig.axes) == 0: fig.subplots(1, 2) return fig.axes[i] lt = LivePlot('det', 'motor', marker='x', markersize=10, ax=partial(get_ax, i=0)) lt2 = LivePlot('det1', 'motor', marker='o', markersize=10, ax=partial(get_ax, i=1)) return (yield from bpp.subs_wrapper(scan([hw.det, hw.det1], hw.motor, -5, 5, 30), [lt, lt2])) RE(same_figure())
In your actual use the hard coded lt and lt2 can be replaced with a loop over the y-values of interest.
lt
lt2
The text was updated successfully, but these errors were encountered:
No branches or pull requests
two quick sketches for how to make use of multiple
LivePlots
in one scan:In your actual use the hard coded
lt
andlt2
can be replaced with a loop over the y-values of interest.The text was updated successfully, but these errors were encountered: