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

REF: update method in plotting #25

Open
wants to merge 5 commits into
base: master
Choose a base branch
from

Conversation

chiahaoliu
Copy link
Collaborator

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.

Copy link
Member

@CJ-Wright CJ-Wright left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This looks great!

"#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')
Copy link
Member

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?)

Copy link
Member

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')
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

👍

self.ax.plot(x, y, label=k, picker=5,
**self.kwargs)
# update matplotlib line data
lines = self.ax.get_lines()
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

awesome!

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

Successfully merging this pull request may close these issues.

2 participants