I am trying to create a simple bar chart with ticks on the x-axis represented by strings in the format YYYY-WW i.e. Year and Week of the Year.
My x labels are too dense as shown below.
In trying to alternate every other tick I came across this post - X-axis tick labels are too dense when drawing plots with matplotlib. This user had the same exact issue as myself and was also using the same format.
The suggestions described that the best way about this is to make the strings datetime objects, as matplotlib will automatically take care of the spacing in that case.
However I have not found any help suggesting how to convert this custom format into a datetime object.