Dash colorscale - possible miscoloring?

Hey there!

I am currently incorporating a Dash app into my Django website and really appreciate the awesome things plotly and Dash allow me do!

However, I am facing a weird issue when using a colorscale (viridis) on a scattergl plot with around 20k data points. The vast majority of points gets colored perfectly fine, but every now and then I stumble across a seemingly miscolored dot, usually a “too high” color. My colorscale has values from 0.0 to around 4.5. When I look at the click data for the point it shows the correct value for marker.color (e.g. 0.49), but the color is somewhere near the max. I included a picture, with an example data point. The coloscale is mapped to the value named “outlier ratio”.

Initially I thought opacity is the problem (which frankly might have been part of it), but I am still facing the issue at opacity = 1. Another thought was a mixup between multiple points with the same coordinates, but the points with the issue have unique coordinates within my dataset.

So far I couldn’t come up with a reasonable explanation why this is happening. I also could not recreate the behaviour in a simpler dataset, so I don’t really know how to go on with this. Maybe anyone has some advice on how to figure this out? :slight_smile:

Could you try clicking on the save icon in the toolbar, and save it to your plotly account, and then share the link? Then we’ll be able to inspect that actual data that you’re seeing and hopefully work on a fix.

Hi Chris,

thanks for your help! Upon trying to save my plot to my account, I noticed it is actually showing the correct colors there. Playing around some more, I found that within my actual django site it is also showing fine in Firefox and Safari, but not in Chrome.

There are also some other issues I started to realize, e.g. my axis labels not showing in Chrome. However, updating Chrome did actually solve these issues. Sorry for the inconvenience with that.

Another issue is the hovertext background color is black in all tested browsers, while it displays the color of the respective dot, when uploading to my plotly account. But that’s more of a cosmetic issue.

Btw, I am using nedned’s trick from this thread for combining django and dash: https://community.plot.ly/t/django-and-dash-eads-method/7717

tl;dr: Problem solved by updating Chrome :stuck_out_tongue:

three reasons why you should buy plotly pro: support open source, get great support, host your plots and dashboards online