MATLAB does not print vector file even with renderer specified

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 件のコメント

Philipp
Philipp 2024 年 4 月 19 日
I have a similar same issue. Exporting as vector graphics does not work for complex figures.

サインインしてコメントする。

回答 (1 件)

VBBV
VBBV 2023 年 12 月 4 日

0 投票

how about image format ?
print('-image','a1.eps','-depsc')

1 件のコメント

sarcastic pedant
sarcastic pedant 2023 年 12 月 5 日
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)

サインインしてコメントする。

カテゴリ

ヘルプ センター および File ExchangeGraphics Performance についてさらに検索

製品

リリース

R2023b

質問済み:

2023 年 12 月 4 日

コメント済み:

2024 年 4 月 19 日

Community Treasure Hunt

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

Start Hunting!

Translated by