Closed
Description
If polygon is defined as multiple rings in one trace, with scattergeo
the relation of the rings seems to be ignored even if fill
is set to toself
. Such polygon is treated as multipolygon and each ring is drawn WRT the whole globe. Projection type is irrelevant. The behavior is different and correct in the case of scatter
plot.
To reproduce:
<http>
<head>
<script src="https://cdn.plot.ly/plotly-latest.js"></script>
</head>
<body>
<div id="plot"></div>
<script>
var plot = document.getElementById('plot');
var layout = {
geo: {
bgcolor: '#fff',
projection: {
type: 'orthographic',
rotation: {
lon: 45,
lat: 10
},
},
showocean: true,
oceancolor: '#fff',
showland: true,
landcolor: '#fff',
showlakes: false,
lakecolor: '#fff',
showcountries: true,
lonaxis: {
showgrid: true,
gridcolor: '#555'
},
lataxis: {
showgrid: true,
gridcolor: '#555'
}
}
};
var traces = [{
lon: [1,1,90,90,1,null,10,20,20,10,10],
lat: [1,27,27,1,1,null,10,10,20,20,10],
mode: 'lines+markers',
type: 'scattergeo',
fill: 'toself',
fillcolor: '#f555',
marker: {color: '#f55a'},
line: {color: '#f55a'}
}];
Plotly.newPlot(plot, traces, layout);
</script>
</body>
</http>
Metadata
Metadata
Assignees
Labels
No labels