3D scatter plot using lat and lon coordinates

Hi,
I have a data in coordinates of latitudes and longitudes. I would like to plot them in a scatter plot directly without converting them to xyz coordinates. Is there a way to do so?
I used scattergeo, but it had the world map built in which I don’t want.

Please help.
Thanks.

What do you mean with “without converting them to xyz coordinates”?

Generally speaking, you can just pass your latitudes as the x-axis and the longitudes as the y-axis to a regular scatter plot (Scatter plots in Python). If you also have the altitude, use the 3d scatter plot and pass the altitudes as the z-axis (3d scatter plots in Python).

yes this will work to make a 2D map. Although, I would like to have it as globe a 3D sphere.

Then you could try go.Scattergeo. For an example, see “Contour lines on globe” on this page: Lines on maps in Python

In the “update_layout” part, you can then set the flags to False, e.g. showland=False, showcountries=False etc.

Here’s the reference for the geo layout: Layout.geo in Python
And here for the scattergeo traces: Scattergeo traces in Python

1 Like