In this Plotly tutorial, you will learn how to plot log plot in Python. You have to use the parameters log_x
and log_y
for log plot.
# Import Plotly Module import plotly.express as px # Import Dataset dataset = px.data.gapminder().query("continent=='Oceania'") # Log Plot plot = px.scatter(dataset, x="gdpPercap", y="lifeExp", color="country", log_x=True, log_y=True) # Show the Plot plot.show()
Output:
