Notes and follow-up thoughts from today's best-effort-viz call with @ronpandolfi, @HarinarayanKrishnan, @ihumphrey, @cryos, and @AbbyGi
- Intents could grow a new keyword argument for injecting bluesky-widget's plot models (e.g.
FigureSpec). The "canvas" objects that interpret them could likewise grow to understand these and create what amounts to a PyQtGraph view for FigureSpec. This would allow us to experiment with integrating the two without fully committing.
- I see two advantages of
FigureSpec (and friends) over intents as a base layer. One I thought of on the call: intents accept a single namespace of kwargs, whereas there is a nesting to figure.axes[0].lines[0] that keeps things organized and separates figure.title vs figure.axes[0].title vs figure.axes[1].title for example. But, as @ronpandolfi observed, this could definitely be recreated with nested dicts in the signature without any fundamental difference. The second is, by encoding the plot description in observable objects with properties that emit signals when they are set, conceptually similar to Qt signals/slots or Jupyter traitlets, we make it possible to define them in one part of the code and then change/update/augment them in another part of the code in a way that the view code can immediately respond to just by subscribing to the relevant signals as soon as it receives the model.
Edited potentially confusing typos for clarity.
Notes and follow-up thoughts from today's best-effort-viz call with @ronpandolfi, @HarinarayanKrishnan, @ihumphrey, @cryos, and @AbbyGi
FigureSpec). The "canvas" objects that interpret them could likewise grow to understand these and create what amounts to a PyQtGraph view forFigureSpec. This would allow us to experiment with integrating the two without fully committing.FigureSpec(and friends) over intents as a base layer. One I thought of on the call: intents accept a single namespace of kwargs, whereas there is a nesting tofigure.axes[0].lines[0]that keeps things organized and separatesfigure.titlevsfigure.axes[0].titlevsfigure.axes[1].titlefor example. But, as @ronpandolfi observed, this could definitely be recreated with nested dicts in the signature without any fundamental difference. The second is, by encoding the plot description in observable objects with properties that emit signals when they are set, conceptually similar to Qt signals/slots or Jupyter traitlets, we make it possible to define them in one part of the code and then change/update/augment them in another part of the code in a way that the view code can immediately respond to just by subscribing to the relevant signals as soon as it receives the model.Edited potentially confusing typos for clarity.