add geoscatter functionality in fig2plotly #396
Merged
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
This PR add
geoscatter
functionality tofig2plotly
. For this I have used Plotly'sScattergeo
(https://plotly.github.io/plotly.py-docs/generated/plotly.graph_objects.Scattergeo.html).Fortunately, the data structure returned by matlab's
geoscatter
provides us with the necessary data to configure the Plotly'sScattergeo
plot.Now, to configure the
Scattergeo axes
it is necessary to configure thegeo
field of the plotlylayout
. To do this, I rely on the following link: https://plotly.com/python/reference/layout/geo/.As we can see, to configure the axes we need to resort to the
layout.geo.lataxis
andlayout.geo.lonaxis
subfields. These fields do not have options to handle theticks
, therefore I assume that it is not possible to display theticklabels
inScattergeo
plots.I share below screenshots of the results obtained so far (testing all the examples at https://github.com/plotly/ssim_baselines/tree/main/matlab/code-examples/geographic-plots/geoscatter) as well as links to chart -studio
https://chart-studio.plotly.com/~galvisgilberto/4460/#/
https://chart-studio.plotly.com/~galvisgilberto/4464/#/
https://chart-studio.plotly.com/~galvisgilberto/4466/#/