Skip to content

add geoscatter functionality in fig2plotly #396

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 1 commit into from
Sep 25, 2021

Conversation

gilbertogalvis
Copy link
Contributor

This PR add geoscatter functionality to fig2plotly. For this I have used Plotly's Scattergeo (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's Scattergeo plot.

Now, to configure the Scattergeo axes it is necessary to configure the geo field of the plotly layout. 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 and layout.geo.lonaxis subfields. These fields do not have options to handle the ticks, therefore I assume that it is not possible to display the ticklabels in Scattergeo 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/#/

Screen Shot 2021-09-22 at 9 37 22 PM

Screen Shot 2021-09-22 at 9 39 30 PM

Screen Shot 2021-09-22 at 9 39 54 PM

@gilbertogalvis gilbertogalvis merged commit c1a4926 into master Sep 25, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants