Append not valid for exportgraphics

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 comentario

user86753
user86753 el 16 de Dic. de 2021
The referenced example says that this functionality was introduced in 2020a but it appears to only work in R2021b.

Iniciar sesión para comentar.

 Respuesta aceptada

Richard Quist
Richard Quist el 17 de Dic. de 2021

2 votos

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

3 comentarios

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 el 31 de En. de 2024
@Nicole009: From the documentation for exportgraphics, Append parameter:
"This option supports PDF and GIF files only."
Nicole009
Nicole009 el 31 de En. de 2024
Ohhh. I read "pdf" as "png" like 25 times. Thanks.

Iniciar sesión para comentar.

Más respuestas (0)

Categorías

Más información sobre Printing and Saving en Centro de ayuda y File Exchange.

Productos

Versión

R2020b

Etiquetas

Preguntada:

el 16 de Dic. de 2021

Comentada:

el 31 de En. de 2024

Community Treasure Hunt

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

Start Hunting!

Translated by