Since Pandas just uses matplotlib, you can, of course, create an identical (stacked) barchart with matplotlib. There is no reason why you can use Pandas for this.
In this case, he is not going to help. Matplotlib bar() changes the x values ββfrom dates to float, so DateFormatter no longer works. You can check xticks with ax.get_xticks() .
I donβt see how you can create xticks dates, but you can override xticklabels yourself:
ax.set_xticklabels([dt.strftime('%Y-%m-%d %H:%M:%S') for dt in data.index.to_pydatetime()])
Rutger kassies
source share