Using Python and Pyplot, one of my plot labels was the following, which gave what I wanted.
plt.ylabel('$\mathrm{\dot{\nu}}$ ($\mathrm{10^{-16} s^{-2}}$)', fontsize=16)
Then instead of the label saying 10^-16, I wanted the label to be 10^-"power" where power is a variable that I have in my code.
I adjusted the code to:
plt.ylabel('$\mathrm{\dot{\nu}}$ ($\mathrm{10^{-{0}} s^{-2}}$)'.format(power), fontsize=16
But I get the following error:
KeyError: '\\dot{\\nu}'
The error seems like it doesn't know when I want to substitute "power" because of all the curly brackets, but I'm not sure how to fix it.