Why isn't the text on a figure selectable when using 'Tex' as interpreter?
2 views (last 30 days)
Show older comments
when i use 'Tex' as interpreter in order to obtain scientific notation and text on figures generated in MATLAB, the text is no longer selectable when using 'Tex' as interpreter on the generated svg-files using inkscape, but it rather appears as an editable shape or path. The issue is that I would like to have the text exported as text within the svg-file in order to manually edit its font and export it as pdf_tex into overleaf (LateX).
Why isn't the text on a figure selectable when using 'Tex' as interpreter?
i used the suggestion from https://de.mathworks.com/matlabcentral/answers/774357-why-isn-t-the-text-on-a-figure-selectable-when-using-latex-as-interpreter. but it did not work. hier is my code:
fig1=figure(1)
surf(X,Y,PsiDD(:,:,36)');
xlabel('current angle $\beta$[deg]','Interpreter','tex'); ylabel('$I_{f}$[A]','Interpreter','tex'); zlabel('${\psi}_{d}$[Vs]','Interpreter','tex');
%set(findall(fig1,'-property','Interpreter'),'Interpreter','tex')
picturewidth = 8.529;
hw_ratio = 3/4;
set(fig1,'Units','centimeters','Position',[0 0 picturewidth hw_ratio*picturewidth])
pos = get(fig1,'Position');
set(fig1,'PaperPositionMode','Auto','PaperUnits','centimeters','PaperSize',[pos(3), pos(4)])
print(fig1,'PsiD','-dsvg','-painters');
0 Comments
Answers (1)
SACHIN KHANDELWAL
on 19 Apr 2024
Hi Abdullah,
The problem you are facing might be due to a rendering issue.
For complex graphics such as surface plots, MATLAB automatically switch to OpenGL rendering which renders the plot as compressed .bmp graphics.
You can use the following MATLAB code.
>> set(gcf, 'Renderer', 'painters');
Hoping it will help you move ahead with your workflow.
Thanks
See Also
Categories
Find more on Printing and Saving 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!