Adding a background image

I’m migrating from Jupyter to Dash and I hit a snag…

I’m working with heatmaps using Python & Plotly. For my heatmaps in Jupyter I was able to add a background image to the plots using this guide:

However, I still can’t seem to figure out how to do the same within Dash. So far I’ve only been able to get my image above or below my plot. Any guidance adding a background image to my heatmap plots would be most appreciated.

It should be the same in both libraries. The figure property in dcc.Graph is the same figure that is used in plotly.offline.plot / py.plot.

Awesome, thanks! I was able to get it to work after importing “plotly.graph_objs as go” and adding to dcc.Graph: “‘layout’: go.Layout(image= [dict(blah blah…”

1 Like

I’m having issues getting a background image into my dash graph. Does the image need to be set in dcc.Graph, or can it work in a callback as well? Here is the topic I posted Unable to make a Background Image appear on Dash plot