Flint: Helper for custom grid plot
This PR add and fix small things to try to speed up creation of complex custom grid layout.
This was designed for ID24, and @berruyer scripts.
This should speed up the rendering and reduce the blinking. Still not an idea solution, but it should improve the situation.
f = flint()
container = f.get_plot("grid", name="Grid", selected=True)
# Create the sub plots
with container.hide_context():
p1 = container.get_plot("curve", row=0, col=0)
p2 = container.get_plot("curve", row=0, col=1)
p3 = container.get_plot("curve", row=1, col=0)
p4 = container.get_plot("curve", row=1, col=1)
p5 = container.get_plot("image", row=2, col=0)
p5.side_histogram_displayed = False
p6 = container.get_plot("image", row=2, col=1)
p6.side_histogram_displayed = False
# Now you can add data to each plots
p1.add_curve([0, 1, 2, 3], [1, 2, 1, 2])
p2.add_curve([0, 1, 2, 3], [2, 1, 2, 1])
p3.add_curve([0, 1, 2, 3], [3, 2, 1, 0])
p4.add_curve([0, 1, 2, 3], [0, 1, 2, 3])