1

If I include this plt.legend(['$0.25+\zeta$'], loc = 1)in my code, I am not getting error. But plt.legend(['$\frac{1}{4}+\frac{\alpha}{10}$'], loc = 1) gives error.

user12290
  • 3,341
  • 1
    Does plt.legend([r'$\frac{1}{4}+\frac{\alpha}{10}$'], loc = 1) work? – debsim May 03 '21 at 10:28
  • Yes, it is working! Thanks a lot. – user12290 May 03 '21 at 10:32
  • Sidenote, I think this would have been better suited at [so] actually, because it seems like purely a Python problem. Unless you tell matplotlib to do so, matplotlib doesn't actually use TeX at all, it has just implemented a subset of the language. (Probably duplicate of https://stackoverflow.com/questions/27474322/ though.) – Torbjørn T. May 03 '21 at 17:22

0 Answers0