'Format Seaborn x axis to MM/DD/YYYY Format
I am wondering how to format my X axis : Currently my axis looks like as follow :
The dream would be to get :
Strugling with this, I tried to convert my Date array to other formats but still does not work.
Currently My array is :
DateList = np.array(list(MaVar['Dates'].tail(6)))
Print(DateList)
-------------
[Timestamp('2021-09-30 00:00:00') Timestamp('2021-10-31 00:00:00')
Timestamp('2021-11-30 00:00:00') Timestamp('2021-12-31 00:00:00')
Timestamp('2022-01-31 00:00:00') Timestamp('2022-02-28 00:00:00')]
The code where I set x axis is below :
sns.heatmap(MatrixData, xticklabels=DateList)
Sources
This article follows the attribution requirements of Stack Overflow and is licensed under CC BY-SA 3.0.
Source: Stack Overflow
| Solution | Source |
|---|


