Why is the latex font not selectable in eps export?

13 visualizzazioni (ultimi 30 giorni)
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?

Risposte (4)

clvk
clvk il 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?

Dimitris Iliou
Dimitris Iliou il 27 Lug 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 Commenti
Marius Brinkmann
Marius Brinkmann il 1 Ago 2017
Thank you, but I want to export the figure as it looks in MATLAB. The pdf-export looks like desired too, but the text isn't selectable, so I cant use ctrl-f to find text in the figure.
So I want to embedd the latex interpreter font in the export.
José-Luis
José-Luis il 1 Ago 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.

Accedi per commentare.


Alp Acem
Alp Acem il 12 Mar 2018
You can use 'tex' interpreter instead of 'latex'. It works for me for selectable text in pdf.
  1 Commento
Samuel Estenlund
Samuel Estenlund il 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.

Accedi per commentare.


Dimitrios Piretzidis
Dimitrios Piretzidis il 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?

Categorie

Scopri di più su Graphics Object Properties in Help Center e File Exchange

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!

Translated by