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

Bar Charts in Python,https://plotly.com/python/bar-charts/ #5129

Open
Mafieuu opened this issue Apr 5, 2025 · 0 comments
Open

Bar Charts in Python,https://plotly.com/python/bar-charts/ #5129

Mafieuu opened this issue Apr 5, 2025 · 0 comments

Comments

@Mafieuu
Copy link

Mafieuu commented Apr 5, 2025

The label is incorrect because the data only concerns Oceania.

Source: https://plotly.com/python/bar-charts/

import plotly.express as px
df = px.data.gapminder().query("continent == 'Oceania'")
fig = px.bar(df, x='year', y='pop',
             hover_data=['lifeExp', 'gdpPercap'], color='country',
             labels={'pop':'population of Oceania'}, height=400)
fig.show()```
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

No branches or pull requests

1 participant