artursp.
SSolara
•Created by artursp. on 3/26/2024 in #questions-issues
Using existing plotly widget to update figures
With go.FigureWidget it is possible to update the data/properties of a figure without redrawing it.
E.g. I can create a scatter plot with a lot of points:
and then update the highlighted points without redrawing it the whole thing:
The straight forward solara equivalent could look like this:
but this will generally run slower as the figure is redrawn IIUC. Is there a way to update the figure using the plotly widget within solara?
3 replies
SSolara
•Created by artursp. on 1/3/2024 in #questions-issues
Keep zoom state of plotly figure when re-render is triggered.
I built an app where I have a coloured scatter plot with many thousand points each associated with an image from a set of classes. I can select points, look at the image and reclassify.
When I want to re render my scatter plot so that it has the updated classes I change a reactive dataframe. This all works fine, the only issue is that I have to zoom into a region of the scatter plot to resolve the points.
Re-rendering resets the axes so I have to find that region again (but I have to re-render regularly to keep track of which points I processed).
So the question is if there is a way to update the scatter plot (i.e. the point colors) without resetting the axes.
4 replies
SSolara
•Created by artursp. on 12/21/2023 in #questions-issues
Remove controls from plotly figure
I'm using plotly to create clickable images that are tightly arranged. For this I need to remove the plotly controls. This can be done by passing config={'displayModeBar': False} to plotly.show, but as this is not a figure property I'm not sure how to accomplish this when doing solara.FigurePlotly(fig).
9 replies