Save GUI axes .jpg (cut-off)
조회 수: 1 (최근 30일)
이전 댓글 표시
I have a GUI which contains an axes('Graph1_axes') and I would like to save it in jpg fromat and with the legends. Right now Im using the next code:
newfig1 = figure('Visible','off');
copyobj(handles.Graph1_axes, newfig1);
saveDataName = fullfile(path1,filename1);
saveas(newfig1,saveDataName,'jpg');
where 'Graph1_axes' is the axes to save, 'path1' where to save and 'filename1' the name of the file, the problem is that is saving the graph but without the legends and cuting-off the graph.
Thanks in advance!
댓글 수: 0
답변 (1개)
David Sanchez
2013년 9월 3일
Use print instead:
print('-dpng',your_fig_name);
or in jpg format:
print('-djpeg',your_fig_name);
참고 항목
카테고리
Help Center 및 File Exchange에서 Legend에 대해 자세히 알아보기
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!