0

I have a multi-index pandas dataframe that looks something like this :

                                    Default Config  Best Config
Device  Experiment Total Power (W)
titan   SGEMM      140                    1.000000     1.158175
                   280                    0.990189     1.273428
        MiniFE     140                    1.000000     1.262243
                   280                    0.979770     1.246412
titanxp SGEMM      140                    1.000000     1.181740
                   280                    1.646472     1.674499
        MiniFE     140                    1.000000     1.037918
                   280                    1.005121     1.203337

I want to draw a bar graph that looks something like this : enter image description here

My main issue is the three-level of x-tick marks right now, as you can see in the hand-drawn image, the Experiment Name is in between Total Power and Device is in between Experiment. How to achieve this. I first thought of drawing separately two subplots and merging them but the issue will be a common y-axis. I am open to some other types of graphs also.

titor
  • 35
  • 1
  • 5
  • 3
    There's no straightforward way to do this. You can find a couple workarounds here: [How to add group labels for bar charts in matplotlib](https://stackoverflow.com/q/19184484/13138364) – tdy Mar 28 '22 at 15:17

0 Answers0