Skip to content
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

Malaysia is shown in a wrong place on a map #2810

Closed
chernyshevdv opened this issue Oct 7, 2020 · 7 comments
Closed

Malaysia is shown in a wrong place on a map #2810

chernyshevdv opened this issue Oct 7, 2020 · 7 comments
Assignees
Labels
bug something broken P2 considered for next cycle

Comments

@chernyshevdv
Copy link

chernyshevdv commented Oct 7, 2020

I am visualizing some data with plotly.express.scatter_geo. Malaysian data is shown in a wrong place:
image
Actually, Malaysia resides on both islands:
image
...but the capital Kuala Lumpur is situated in north-western part, and this part is associated with MY on maps by people.
Code is the following:

import nbformat
import plotly.express as px
import pandas as pd

...
fig = px.scatter_geo(df_merged, locations="alpha_3", size="devices", hover_name="country")
print(fig.to_html())

Package version is plotly==4.11.0.
JSON map is world_110m.json.

@Shwetago
Copy link
Contributor

Shwetago commented Oct 9, 2020

What is df_merged here?

@chernyshevdv
Copy link
Author

chernyshevdv commented Oct 9, 2020

What is df_merged here?

df_merged is a pandas DataFrame containing data similar to the following:

+---------------+---------+
|  alpha_3      | devices |
+---------------+---------+
|  MYS          |       2 |
+---------------+---------+
|  ROU          |       4 |
+---------------+---------+

@Shwetago
Copy link
Contributor

Shwetago commented Oct 9, 2020

I think this is because of the values in the dataset that you are using. Your source code is correct!

@chernyshevdv
Copy link
Author

I know that my source code is correct :-) I believe that the library is showing Malaysia at a slightly wrong place.

@gvwilson gvwilson added P3 backlog bug something broken labels Aug 12, 2024
@gvwilson
Copy link
Contributor

@archmoj can you please check this against your recent work and see if it's still an issue?

@archmoj
Copy link
Contributor

archmoj commented Aug 12, 2024

This is also related to geo subplots not map & mapbox.
@ndrezn Please keep track of this ticket.

@gvwilson gvwilson added P2 considered for next cycle and removed P3 backlog labels Aug 19, 2024
@gvwilson gvwilson assigned gvwilson and unassigned ndrezn Nov 20, 2024
@ndrezn
Copy link
Member

ndrezn commented Feb 11, 2025

Closing in favor of plotly/plotly.js#7334

@ndrezn ndrezn closed this as completed Feb 11, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug something broken P2 considered for next cycle
Projects
None yet
Development

No branches or pull requests

5 participants