0

I am trying to remove italics font from a latex symbol in a matplotlib plot. I tried \mathrm{/copyright} from the following post, but it seems to not work with symbols: remove italics in latex subscript in matplotlib

Please help!

import numpy as np
import matplotlib.pyplot as plt

x = np.arange(10)
y = x

plt.plot(x,y,'ro')
plt.xlabel("$\mathrm{\copyright}$")

enter image description here

T-Dog
  • 135
  • 8
  • 2
    You don't have any subscript text in your label; and I don't see anything italicised. What exactly is the problem you are trying to solve? – tmdavison Sep 28 '21 at 10:18
  • Also, I believe `\copyright` is available in normal `TeX` text mode, rather than mathmode, so removing the `$$` might help – tmdavison Sep 28 '21 at 10:21
  • 2
    You could also directly copy-paste the UTF-8 symbol, without involving TeX. `©` (`plt.title('\u00A9', size=20)` or just `plt.title('©', size=20)`). – JohanC Sep 28 '21 at 10:36
  • Thank you for the tips. It still looks the same. Maybe there is not a way to display the copyright symbol without the 'c' touching the circle around it... – T-Dog Sep 29 '21 at 08:42
  • Ah, so the problem isn't that it is italic or subscript, but that the "c" touches the circle. This sounds like a classic [X-Y problem](https://xyproblem.info)! Perhaps try changing the font to one which has a copyright symbol that you like the look of? – tmdavison Sep 30 '21 at 10:03

0 Answers0