In the program Minitab, there is a way to specify a categorical and sub-categorical type of x-axis for interval plots like this
Is there a way to mimic this type of x-tick representation using matplotlib? I tried to look through the documentation as well as stack overflow questions but the closest I could come up with is this where the higher-level categories are just consecutively repeated. I would like to have it such that, for example, the outermost category p1 would be displayed only once in the center of the first six x-axis ticks instead of repeated six times for each x-axis tick