WIP: Flint: Transaction for plot changes
Closes #909 (closed) Closes #910 (closed) Closes #2051 (closed)
This MR aim to rework the custom plot API in order to:
-
Provide a real concept of CustomPlot in Flint -
Provides context manager to edit plot properties in a single step (transaction). -
Allow to execute a custom function from BLISS to Flint -
Implement few properties to edit
-
This should:
- Clean up a little the Flint base code
- Add more flexibility to write BLISS side API
- Avoid blinking
On BLISS side this kind of code could be written
p = plot.plot()
p.upload("foo", data)
p.upload("foo2", data2)
with p.transaction():
p.set_colormap(...)
p.set_axis(...)
p.add_image(...)
p.add_curve(...)
It will be based on low level API like:
from bliss.common import plot
p = plot.plot()
def execute_on_plot(silx_plot):
y = silx_plot.getYAxis()
y.setLabel("Foobar")
y.setInverted(True)
p.remote_invoke(execute_on_plot)