Why is the latex font not selectable in eps export?
13 views (last 30 days)
Show older comments
Hello,
I want to import my MATLAB plots in LaTeX. The text is selectable if I use the default interpreter, but the sans serif font doesn't look great in my thesis.
The latex interpreter produces a nice output, but the text isn't selectable. I tried using matlab2tikz, but the output doesn't look great neither.
Are there different functions which export the text in a tex file like Inkscape does it, or is it possible to make the latex font selectable?
0 Comments
Answers (4)
clvk
on 1 Nov 2017
I have the same issue after changing to a Windows 10 pc, both with MATLAB 2016b and with 2017a.
My scripts have always produced figures with selectable text once saved, exported or printed to EPS or PDF. With windows 10 / 2016b the text has become outlined and can no longer be selected. Also Illustrator does not identify the objects as text.
Manually overriding the renderer to Painters makes no difference. The OpenGL renderer obviously produces a bitmap output.
Does anyone know what has changed in the recent releases, or if some fonts could be missing in my present Windows 10 setup?
0 Comments
Dimitris Iliou
on 27 Jul 2017
If I understand correctly, you are just trying to change the fonts in your plots. To do that, you could try and change them using the axes properties.
Specifically, assuming you have the handle ax of the axes, you could type
ax.FontName = 'Cambria';
That will replace all the fonts of the current axes (ticks, labels, title, etc).
You can find more information on how to modify the Fonts on the axes in the following documentation link:
2 Comments
José-Luis
on 1 Aug 2017
What format are you using to save your figures? If it's a bitmap format, then you can't modify the font afterwards.
If it's vector graphics, depending on the actual format, it might be possible to do so afterwards, although it could be mighty difficult.
I am not really understanding what you are trying to achieve. It's easier to generate your plots as you want them than to try to modify them afterwards. That's just begging for a world of hurt.
Alp Acem
on 12 Mar 2018
You can use 'tex' interpreter instead of 'latex'. It works for me for selectable text in pdf.
1 Comment
Samuel Estenlund
on 16 Feb 2024
That does make the text selectable, yes. However, one reason for using the latex interpreter is that it enables exporting figures with other fonts and that does not work with the tex interpreter.
Dimitrios Piretzidis
on 25 Feb 2023
I have the same issue with MATLAB R2020b. As soon as I change the axis and legend interpreter to Latex, the text in the exported eps file is not selectable. export_fig did not help and matlab2tikz heavily changes the figure specs. Has anyone resolved this issue?
0 Comments
See Also
Categories
Find more on Graphics Object Properties in Help Center and File Exchange
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!