exportgraphics too many input arguments

I tried to export a plot using
>> exportgraphics(gca,'test.eps')
And I get the error message:
Error using exportgraphics
Too many input arguments.
Same problem if I try to use saveas
f=figure
saveas(f,'test','pdf')
I get:
Error using printopt
Too many input arguments.
Error in matlab.graphics.internal.mlprintjob
Error in printjob (line 22)
pj = matlab.graphics.internal.mlprintjob;
Error in saveas (line 159)
[ops,dev,ext] = printtables(printjob(h)); %#ok

댓글 수: 4

Try
clear functions
rehash
and try again.
That will keep variables and the figure but cause MATLAB to refresh function and file system caches which oftentime will fix a broken/inadvertently aliased internal function.
If that fails save your workspace and restart MATLAB and then try again.
If that fails, it's time to call official TMW support.
Pierre
Pierre 2023년 1월 17일
Getting the same error while trying to save figures both manually and with code (savefig()). Couldn't resolve it by following the instructions above, so filed a bug report. Anyone solved this?
Adam Danz
Adam Danz 2023년 1월 18일
@Pierre could you attach the figure you're trying to export and let us know what MATLAB release you're using?
I have the same problems when I try to save a figure (in .fig format) both manually and with code (either using saveas and savefig).
In al cases I get the error: "error using saveas too many input arguments"
No errors appear when I save the figure in anyother format (pdf,jpg,eps,..).
I found the same error using R2022b, R2021a running in different computers. I did not notice this error en older versions.
Has anyone solved this?
any idea how to deal with it?
Thank you

댓글을 달려면 로그인하십시오.

답변 (1개)

Pierre
Pierre 2023년 1월 18일

0 개 추천

Hi Adam,
I filed a bug report for this. It's any figure, even an empty one. I'm using R2022b.
Thanks

카테고리

도움말 센터File Exchange에서 Printing and Saving에 대해 자세히 알아보기

제품

릴리스

R2020b

질문:

2022년 10월 5일

댓글:

2024년 7월 24일

Community Treasure Hunt

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

Start Hunting!

Translated by