I am unable to execute this example for appending plots to a .pdf file. Is Append no longer a valid option?
plot([0 0.3 0.1 0.6 0.4 1]);
ax = gca;
exportgraphics(ax,outfilename)
bar(1:10)
exportgraphics(ax,outfilename,'Append',true)
Error in Untitled4 (line 11)
exportgraphics(ax,outfilename,'append',true)
Error using exportgraphics
Illegal option 'append' given.

댓글 수: 1

user86753
user86753 2021년 12월 16일
The referenced example says that this functionality was introduced in 2020a but it appears to only work in R2021b.

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

 채택된 답변

Richard Quist
Richard Quist 2021년 12월 17일

2 개 추천

The exportgraphics function was added in R2020a, but the append option was introduced in R2021b.

댓글 수: 3

In R2023b, I'm getting the following error:
Error using exportgraphics
'Append' value must be false for png files.
Code:
exportgraphics(gcf,'myPlot.png','append',true)
Voss
Voss 2024년 1월 31일
@Nicole009: From the documentation for exportgraphics, Append parameter:
"This option supports PDF and GIF files only."
Nicole009
Nicole009 2024년 1월 31일
Ohhh. I read "pdf" as "png" like 25 times. Thanks.

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

추가 답변 (0개)

카테고리

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

제품

릴리스

R2020b

질문:

2021년 12월 16일

댓글:

2024년 1월 31일

Community Treasure Hunt

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

Start Hunting!

Translated by