Skip to content Skip to sidebar Skip to footer

Seaborn Barplot And Formatting Dates On X-axis

I am currently working on visualizing datasets with Seaborn and Pandas. I have some time-dependent data that I would like to graph in bar charts. However, I am battling with two is

Solution 1:

No, you cannot use seaborn.barplot in conjunction with matplotlib.dates ticking. The reason is that the ticks for seaborn barplots are at integer positions (0,1,..., N-1). So they cannot be interpreted as dates.

You have two options:

  1. Use seaborn, and loop through the labels and set them to anything you want
  2. Not use seaborn and have the advantages (and disadvantages) of matplotlib.dates tickers available.

Post a Comment for "Seaborn Barplot And Formatting Dates On X-axis"