Open danielballan opened 3 years ago
Another important consequence of this is that the bottom layer LineSpec
is not bound to a single BlueskyRun
, and you could generate LineSpec
s joining data from multiple Runs. And of course from things that have nothing to do with BlueskyRun
at all.
Also, if transform
always returns a dict
of kwargs rather than an artist-specific construct (like (x, y)
for lines) we can simplify the view code and reduce the artist-specific code.
h/t @tacaswell
BlueskyRun
into a classmethod. That could easily be moved off to a subclass in the future.@tacaswell shared this snippet of work related to matplotlib 4.0 https://gist.github.com/tacaswell/95177903175dbc28be5353b4a0e5118f. Keeping this here so I don't lose it.
The view code knows about of the concept of a
BlueskyRun
and its particular interface and signals:https://github.com/bluesky/bluesky-widgets/blob/434046b54ee160cdcdd7a6c8c1fc1bf7e82d575b/bluesky_widgets/_matplotlib_axes.py#L104-L105
https://github.com/bluesky/bluesky-widgets/blob/434046b54ee160cdcdd7a6c8c1fc1bf7e82d575b/bluesky_widgets/_matplotlib_axes.py#L121-L125
What if, instead, we separate the bluesky-aware aspect into a separate components, perhaps by subclassing like so:
then
LineSpec
and the views become generic. That would extend the utility of these components at the cost of an additional layer of signaling.