Home > OS >  How can I add "secondary" labels with different font sizes to axes in Matplotlib?
How can I add "secondary" labels with different font sizes to axes in Matplotlib?

Time:03-20

I am trying to generate the following figure in Matplotlib:

enter image description here

Code used to generate the axes (without the labels):

import matplotlib.pyplot as plt
fig,ax = plt.subplots(3,3,sharex=True,sharey=True,
                      constrained_layout=False)

I know how to add the labels "X-axis label here" and "Y-axis label here", but I am not sure how to place the labels "A","B","C","D","E", and "F" where they are shown in the figure above. These labels should also have different font sizes to "X-axis label here" and "Y-axis label here". Any suggestions?

CodePudding user response:

The general approach would be to use enter image description here

  • Related