✊🏿 Black Lives Matter. Please consider donating to Black Girls Code today.
🐇 Announcing Dash VTK for 3d simulation graphics. Check out the March webinar.

Insert figure on top of an image

Hi, everybody,
I’m trying to do graphics in Dash and I’ve run into a problem. The thing is that I would like to insert an image in which I can zoom, move in it etc (just like in a graphic) and also add some rectangles on top of it. I managed to insert the background image but I don’t know how to add more elements on top of it. The idea is to do something like what I show you in the image below.

I hope you can help me, thank you very much to everyone!

Hi @josemanuu welcome to the forum! You can add the image either as a layout image (https://plot.ly/python/images/) or as an image trace (https://plot.ly/python/imshow/) if you would like to interact more with the image (hover, selection, etc.). As for adding rectangles, you can add shapes to the figure, see https://plot.ly/python/shapes/. Or do you want to add the shapes by drawing (click and drag) on the image? The latter feature is not available yet with plotly/dash but we’re experimenting with it.