Interactive Data Visualization with Plotly 01-02-2024, 02:56 AM
#1
import plotly.express as px
# Create a scatter plot with a trendline
data = px.data.iris()
fig = px.scatter(data, x='sepal_width', y='sepal_length', color='species', trendline='ols')
fig.show()
# Create a scatter plot with a trendline
data = px.data.iris()
fig = px.scatter(data, x='sepal_width', y='sepal_length', color='species', trendline='ols')
fig.show()