Skip to content

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.

@chiahaoliu chiahaoliu requested a review from CJ-Wright December 6, 2018 16:52
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?

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