Histogram over all days of the week
Create histogram
fig=px.histogram(my_df,
x=‘hour_of_day’,
color=‘IDS’,
nbins=24,
facet_row=‘dst_country’,
facet_col=‘day_of_week’,
color_discrete_map={
“NORMAL”: “green”,
“SUSPICIOUS”: “yellow”,
“FRAUD”: “RED”},
category_orders={“day_of_week”: [“Monday”, “Tuesday”, “Wednesday”, “Thursday”, “Friday”, “Saturday”, “Sunday”]},
title=“User xxx, Mondays, split on dst-country”)
remove day_of_the_week = and dst_country= from the labels
for annotation in fig.layout.annotations:
annotation.text = annotation.text.split("=")[1]
Set range for x-axis
fig.update_layout(xaxis=dict(range=[0,24]))
fig.show()