python matplotlib axis label subscript based on loop counter
问题 I'm using python and matplotlib to generate graphical output. I am creating multiple plots within a loop and would like the loop counter to serve as an index on the y-axis label. How do I get the loop counter (a variable) to appear as a subscript? Here's what I have: axis_ylabel = plt.ylabel(u"\u03b1 [\u00b0]", rotation='horizontal', position=(0.0,0.9)) resulting in: α [°] (I'm using unicode instead of Tex because dvipng is not available on this system.) I would like something like this: for