exporting figures as vector graphics without white spacing
Mostrar comentarios más antiguos
Hello
I am
(1) trying to reduce the amount of white space around my figure when it is saved in matlab
(2) I am trying to export it as vector graphics
My code , generalized to a simple example, is as follows:
figure(figureNum);figureNum=figureNum+1;
x=1;
m=[1,2];
bar(x,m); hold on %mean on the y-axis
set(gca,'fontsize',fontSize);
I tried
exportgraphics(gca,'myplot.png','Resolution',300) and it did not work.
Respuestas (1)
David Hill
el 7 de Abr. de 2022
x=1;
m=[1,2];
bar(x,m);
exportgraphics(gcf,'myplot.png','Resolution',300)
Categorías
Más información sobre Printing and Saving en Centro de ayuda y File Exchange.
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!