import plotly.express as px df = px.data.gapminder().query("year == 2007") fig = px.scatter(df, x="gdpPercap", y="lifeExp", hover_name="country", log_x=True) fig.show()