+ -
04:24
Data Visualization with Python
Cheat Sheet : Plotly and Dash
Function Description Syntax Example
Plotly Express
scatter Create a scatter plot px.scatter(dataframe, x=x_column, y=y_column) px.scatter(df, x=age_array, y=income_array)
line Create a line plot px.line( x=x_column, y=y_column,'title') px.line(x=months_array, y=no_bicycle_sold_array)
bar Create a bar plot px.bar( x=x_column, y=y_column,title='title') px.bar( x=grade_array, y=score_array, title='Pass Percentage')
px.sunburst(dataframe, path=[col1,col2..], px.sunburst(data, path=['Month', 'DestStateName'], values='Flights',title='Flight
sunburst Create a sunbust plot
values='column',title='title') Distribution Hierarchy')
histogram Create a histogram px.histogram(x=x,title="title") px.histogram(x=heights_array,title="Distribution of Heights")
px.scatter(bub_data, x="City", y="Numberofcrimes",
bubble Create a bubble chart px.scatter(dataframe, x=x,y=y,size=size,title="title")
size="Numberofcrimes",hover_name="City", title='Crime Statistics')
px.pie(values=exp_percent,
pie Create a pie chart px.pie(values=x,names=y,title="title")
names=house_holdcategories, title='Household Expenditure')
Plotly Graph Objects