I am trying to create a terrain map in plotly.js. It is going well except when I try to fill the polygons using fill=toself. Instead of filling the interior of the polygon, everything but the polygon is filled with the selected color.
I created a minimal repro with a single polygon. In the picture below I was expecting the square to be red vs. everything but the square. Is this expected and fill=toself is trying to solve other scenarios? It seems wrong but maybe I don’t understand what that does.
I’m having the same problem with python plotly. I’ve found that certain polygons will fill correctly and others will not. For example coordinates lat=[10,20,20,10,10] and lon=[10,10,20,20,10] will fill the interior, while coordinates lat=[0,20,20,10,0] and lon=[0,10,20,20,0] will not.