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

Why does the textfont.color property not accept a list of colors when using Scattermapbox?

I’m trying to produce a scatter plot where only text is shown instead of ‘marker+text’: this is a map of maximum 2m temperature. I need to color as well the text in the same way it is done to the markers, according to the variable that I’m plotting (in this case temperature). Something similar to this:

Somehow passing an array of values as color property to textfont is not supported as in the marker property: you need to pass an array of colors already mapped onto the colorscale… So I went ahead and made my own list of colors (as RGBA strings) by mapping the colorscale to the max/min of the values. Then I used this list of colors in the textfont.color property of go.Scattermapbox as indicated here Text and Annotations | Python | Plotly.

However I discovered that this only works when using go.Scattergeo; go.Scattermapbox only accepts a single color for the text.

Why is that? Is there any workaround?