How to set custom labels for x axis in a bar chart?

Hey guys, I did receive an answer on my Stackoverflow topic.

The solution to this problem is:


yy = plot_df.year.unique()
labels = [[q+' '+str(yy[0])+' '+q+' '+str(yy[1])] for q in plot_df.qtr.unique()]
fig.update_xaxes(tickvals=np.arange(4), ticktext=labels)

Hope it can be helpful to other people too.

REgards,
Leonardo

2 Likes