Introduction to Data Visualization with Plotly in Python
Alex Scriven
Data Scientist
$$
Common univariate plots:
Histograms have:
The dataset collected by scientific researchers on Penguins:
fig = px.histogram( data_frame=penguins,
x="Body Mass (g)", nbins=10)
fig.show()
orientation
: To orient the plot vertically (v
) or horizontally (h
)histfunc
: Set the bin aggregation (eg: average, min, max).$$
$$
$$
$$
Check the documentation for more
Summarizes a variable using quartile calculations
$$
$$
fig = px.box(data_frame=penguins,
y="Flipper Length (mm)")
fig.show()
hover_data
: A list of column name(s) to display on hoverpoints
: Further specify how to show outliers$$
$$
$$
$$
Check the documentation for more
Introduction to Data Visualization with Plotly in Python