Graphics, Figures & Tables.eps figure labels not displaying correctly

Information and discussion about graphics, figures & tables in LaTeX documents.
Post Reply
tutpk
Posts: 1
Joined: Thu Dec 13, 2012 10:05 pm

.eps figure labels not displaying correctly

Post by tutpk »

I am saving images to .eps using python and Matplotlib.

LaTeX is not reading the image labels correctly. In the attached image, the left image is how the image looks when using it in LaTeX and converting to a pdf, while the right image is what appears if I use any compatible image viewer to look at just the .eps, which is exactly how it should appear.

I suspect it has something to do with "math mode" and the labels. The label (in Python) is:
ylabel(r'$\varepsilon_{x}$ ($\mu$m)')

So, the only things showing up are the elements that are in math mode (between the $ signs), but not the subscript {x}.

I can't just include everything inside $ signs, as that would screw up the look of the m and the ( and )s, and that doesn't explain why {x} isn't working.

I can also save things as pdf, and convert them to eps, but that introduces a bunch of resolution issues and removes the ability to edit the labels inside the eps.

Thanks for the help!
Attachments
LatexErrorCompare.png
LatexErrorCompare.png (11.89 KiB) Viewed 3488 times

Recommended reading 2024:

LaTeXguide.org • LaTeX-Cookbook.net • TikZ.org

NEW: TikZ book now 40% off at Amazon.com for a short time.

And: Currently, Packt sells ebooks for $4.99 each if you buy 5 of their over 1000 ebooks. If you choose only a single one, $9.99. How about combining 3 LaTeX books with Python, gnuplot, mathplotlib, Matlab, ChatGPT or other AI books? Epub and PDF. Bundle (3 books, add more for higher discount): https://packt.link/MDH5p

Post Reply