Hi.
I have been using Plotly Express and I must say, it’s amazing to work with.
I was generating a heat map from my DataFrame and wanted to change the colour scale. But it didn’t work when I deployed it in my Dash app. It does show the default blue-pink heat map but doesn’t change to the Tealrose scale.
I’m glad you like it so far! The behaviour you’re describing is very strange… It happens only in a Dash app and not in a notebook, say? This could be a question of versioning, whereby the version of plotly.js that Dash is using is lower than the version of plotly.js that Plotly.py/Plotly Express is expecting. If you open the Javascript console and type Plotly.version what do you see?
I checked the version on my python console and the version of Plotly is 3.10.0. I have no idea how to do that on javascript though (I’m new to programming actually).
Hi! I checked once again. The colorscale appears just fine when I run on Jupyter notebook. But it doesn’t change when I run it using IDLE, which is what I normally use for Python coding.
Hmm, so some IDEs like Visual Studio and maybe IDLE (I don’t know that one!) have a built-in older version of Plotly.js which is not compatible with the newer versions of Plotly Express…
If I write a simple code to make a Plotly figure on IDLE, it doesn’t work, but if I write it on a Dash app it does. So, I doubt Plotly figures even run on IDLE.
I am having the same issue as dave’s original issue. Plotly Express lets me set the color in Jupyter Notebook, but it ignores the color specification when in the Dash context.