Colours and symbolics#
Colours, symbols, and flags are powerful elements in dashboards and reports for guiding the user’s attention and conveying messages.
These elements are relevant both inside plots and throughout the dashboards as a whole.
Plots#
Groups#
Colours, linestyles and plot symbols are typically used to identify or emphasize groups or classes.
Most plotting libraries have contrasting colour series specially made for categories.
Scatterplots with group-wise symbols or symbol selection based on a DataFrame column.
# Use plotly express to plot petal widths and lengths of the iris data set (imported from plotly).
# Colour and symbol by species.
import plotly.express as px
df = px.data.iris()
fig = px.scatter(df, x="petal_width", y="petal_length", color="species", symbol="species")
fig.show()