-
Notifications
You must be signed in to change notification settings - Fork 1
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
REF: update method in plotting #25
base: master
Are you sure you want to change the base?
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This looks great!
xpdview/waterfall.py
Outdated
"#AB987A", "#C09F80", "#b0b0b0ff"] | ||
mpl.rcParams['axes.prop_cycle'] = cycler(color=simonCycle2) | ||
from pkg_resources import resource_filename as rs_fn | ||
style_fp = rs_fn('xpdview', 'billinge.mplstyle') |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Can we pull this from a url (just in case we change things?)
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Is it possible for this to be handled externally from the waterfall module? Could users do this themselves at the beamline, in case they want their own configuration?
x_offset_slider_ax = self.fig.add_axes([0.6, 0.95, 0.3, 0.035]) | ||
self.x_offset_slider = Slider(x_offset_slider_ax, | ||
'x-offset', 0.0, 1.0, | ||
valinit=0.1, valfmt='%1.2f') | ||
valinit=0., valfmt='%1.2f') |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
👍
xpdview/waterfall.py
Outdated
self.ax.plot(x, y, label=k, picker=5, | ||
**self.kwargs) | ||
# update matplotlib line data | ||
lines = self.ax.get_lines() |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
awesome!
New data can be added properly through update
Instead of creating new mpl line instances every time which becomes expensive when hundreds of curves are fed, we cache them and redraw with the new data value to speed things up.
This PR is not finished yet.