new print command 2019a

Dear Sirs,
in the past until version 2018b I have used the command
eval(['print -depsc ' bildpfad 'filter_3k_s11b.eps'])
to save a figure. bildpfad is a string for the figure path.
With this command I do not have any problems with the figure size.
At the version 2019a You have changed the print command.
When I use it I get a warning the figure is to large,
The figure is resized and the color is black and not blue as at screen.
Can You give me a simple equivalent command to the
print command above please
Yours sincerely
Siegfried Martius

3 件のコメント

Stephen23
Stephen23 2019 年 3 月 29 日
編集済み: Stephen23 2019 年 3 月 29 日
Why on earth are you using the unnecessary indirection of eval when you can simply call print directly (exactly as its documentation shows)?
Instead of this complex, indirect, obfuscated code:
eval(['print -depsc ' bildpfad 'filter_3k_s11b.eps'])
simply call print directly:
print(fullfile(bildpfad,'filter_3k_s11b.eps'),'-depsc')
I also added fullfile to correctly concatenate the directory and filename, and provided the inputs in the order that the print documentation uses:
Siegfried Martius
Siegfried Martius 2019 年 3 月 29 日
Dear Stephen,
thank You for the fast answer, I have success with the new command,
best regards and a have a nice day
Siegfried
Guillaume
Guillaume 2019 年 3 月 29 日
編集済み: Guillaume 2019 年 3 月 29 日
Note that the syntax that Stephen mentions above has absolutely no effect on the result. If your original syntax did not work, the new syntax will still not work. So that's not the reason why you have success with the new command and you probably still need to investigate that (unless you've also followed the advice in Stephen's answer below).
Of course, you definitively should use Stephen's syntax and forget that eval even exists.

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

回答 (0 件)

カテゴリ

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

製品

リリース

R2019a

タグ

質問済み:

2019 年 3 月 29 日

編集済み:

2019 年 3 月 29 日

Community Treasure Hunt

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

Start Hunting!

Translated by