MATLAB does not print vector file even with renderer specified

6 vues (au cours des 30 derniers jours)
sarcastic pedant
sarcastic pedant le 4 Déc 2023
Commenté : Philipp le 19 Avr 2024
Hello,
I am currently using Matlab 2023b, but the same issue pertains also to Matlab 2021b, which I still have installed. I used to export my figures (for example, contour plots etc.) with no problem via
print('-painters','a1.eps','-depsc')
in 2023b I changed it obviosuly to
print('-vector','a1.eps','-depsc')
It worked fine, and I could always import it into vector graphics editing software and edit there. But that is no longer true for some unknown reason. If I do it like this, part of the figure (e.g., axes, tickes, labels etc.) will be exported correctly as a vector graphics, but the plot itself is exported as a bitmap. Setting renderer explicitly to Painters, RendererMode to manual does not help. Saving as a pdf does not help either. ALso saving via save rather than print also does not help. All lead to the same result.
Any ideas on how to fix this?
I suspect the issue might be related to the Qt plugin error that I get when trying to launch some applications (even though my Python runs fine). But in principle MATLAB should not use that plugin at all, should it?
Thanks a lot in advance!
UPDATE: this is not an issue for simple plots (e.g., using plot function or even contourf function), but if I use surf function for example, then the graph is a bitmap. It used to be vector even for surf function generated plots...
  1 commentaire
Philipp
Philipp le 19 Avr 2024
I have a similar same issue. Exporting as vector graphics does not work for complex figures.

Connectez-vous pour commenter.

Réponses (1)

VBBV
VBBV le 4 Déc 2023
how about image format ?
print('-image','a1.eps','-depsc')
  1 commentaire
sarcastic pedant
sarcastic pedant le 5 Déc 2023
no, that makes everything on the figure a raster image (including axes, tickes, labels etc.) that is otherwise vector if I use '-vector' renderer. I think it makes sense because '-image' forces Matlab to use OpenGL renderer which produces raster by definition. It just does not make sense why -vector does not work properly on some plots (like using surf function)

Connectez-vous pour commenter.

Produits


Version

R2023b

Community Treasure Hunt

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

Start Hunting!

Translated by