go.Scatter custom marker images?


I am building a Dash application for a school project that requires me to create a scatter plot. This was straightforward and easy to implement based on the Dash documentation. My question is this though: for the markers of my scatter plot, I was wondering if it were possible to replace the default markers with another object or image?

To describe it further this is the goal I have: in my scatter plot each point represents a gene in a dataframe. Each gene has a column that contains a list of pathways that this gene is part of. We want to color the markers by pathway but since most genes have several pathways I was wondering if it were possible to replace the marker with its own pie chart representing these pathways?

My initial idea is so create a function to generate the static pie chart image and use that for the marker but I am not even sure if this is possible from the searches I have done. There was a post here a couple here’s ago, How to make custom marker for Dash scattergl? that asked a similar question but at the time this was not possible. I was wondering if anything has changed on that front?

Thank you!

Hi @biokr and welcome to the Dash community :slight_smile:

Check out this cool example from @RenaudLN Put images inside bubbles. I think it’s exactly what you are looking for!

Your projects sound really interesting and it would be great to see how it turns out. Feel free to share an image of it here when it’s done. Good luck!


Great! Thank you for that link. I will read it over to see if I can build off that. And I will definitely share here if I am successful.

1 Like