I need to format dates on a x-axis ggplot for python bar chart.
How can I do it?
I need to format dates on a x-axis ggplot for python bar chart.
How can I do it?
Use scale_x_date() to format dates on the x-axis.
p = ggplot(aes(x='date'), data) + geom_bar() + scale_x_date(labels='%m-%Y')
This gives number of month and the year, for example, 01-1990 You can try other formats.