Introductie tot datavisualisatie met Plotly in Python
Alex Scriven
Data Scientist
$$
$$

import plotly.express as pxfig = px.scatter( data_frame=penguins, x="Body Mass (g)", y="Flipper Length (mm)") fig.show()

Handige plotly.express-argumenten voor scatterplots:
trendline: Voeg verschillende trendlijnen toesymbol: Gebruik verschillende symbolen per categorie$$
$$
$$
Zie de documentatie voor meer
$$
fig = px.line(
data_frame=msft_stock,
x="Date",
y="Open",
title="MSFT Stock Price (5Y)")
fig.show()
$$

$$
De Pearson-correlatiecoëfficiënt:
df bevat gegevens over fietsverhuur en weersomstandigheden
cr = df.corr(method="pearson")
print(cr)

$$
fig = px.imshow(cr,text_auto=True,color_continuous_scale="RdYlGn", zmin=-1, zmax=1)fig.show()

Introductie tot datavisualisatie met Plotly in Python