Borrar filtros
Borrar filtros

save axes as image

2 visualizaciones (últimos 30 días)
M
M el 4 de Abr. de 2012
Hi,
I have the two codes below for saving plots in my GUI. But first saves just the axes without the labels of axis. The secod saves the figure, which is my whole GUI.
What I would like to do is to save the axes with labels or colorbar or.....
Thanks
1) [file,path]=uiputfile({'*.bmp','BMP'},'Save Image As'); f=getframe(handles.axes); [x,map]=frame2im(f); imwrite(x,fullfile(path, file),'bmp');
2) [file,path]=uiputfile({'*.bmp','BMP'},'Save Image As'); saveas(handles.axes,fullfile(path, file));

Respuesta aceptada

Image Analyst
Image Analyst el 4 de Abr. de 2012
It will get you the whole figure or just a single axes. Not sure if the colorbar is considered part of the axes though - would need to try saving the axes to check.
  2 comentarios
M
M el 5 de Abr. de 2012
thanks it worked!
Oliver Woodford
Oliver Woodford el 9 de Abr. de 2012
The colorbar is considered part of the parent axes.

Iniciar sesión para comentar.

Más respuestas (0)

Categorías

Más información sobre Printing and Saving en Help Center y File Exchange.

Community Treasure Hunt

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

Start Hunting!

Translated by