exporting plot as .tiff image

조회 수: 3 (최근 30일)
douglas
douglas 2012년 4월 5일
I am trying to save a plot gathered from data in a text file as a .tiff image. When I use the command saveas(gcf,'results.tiff') it sends the figure out as a tiff image but it seems to resize the image. the axis are compressed and the graphs not as easily read. Is there a way to insure that the exported tiff image look identical to and share the same size and appearance as the created plot?

채택된 답변

Walter Roberson
Walter Roberson 2012년 4월 5일
There are several possible answers to this:
  1. check your figure PaperPosition and PaperPositionMode, and read about the figure ResizeFcn . If you do not set the PaperPosition manually, then the image of the figure could get resized to fit the page, and as the aspect ratio of the paper would usually not match what you have on the screen, the result might look ratty. But if you do set the PaperPosition so you can control the aspect ratio, then the ResizeFcn will get called to allow you to layout the page differently (e.g., you might be doing landscape and the wider page might allow you to use fewer rows for a text area, so that area might get shorter, and all kinds of things might have to move to look good.)
  2. http://matlab.wikia.com/wiki/FAQ#How_do_I_save_my_figure.2C_axes.2C_or_image.3F_I.27m_having_trouble_with_the_built_in_MATLAB_functions.
  댓글 수: 1
douglas
douglas 2012년 4월 5일
I got some clues online and tried this out:
figure('position', [0 0 800 1100], 'PaperPositionMode', 'auto');
and it seemed to fix the issue! Thanks again.

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

추가 답변 (0개)

카테고리

Help CenterFile Exchange에서 Read and Write Image Data from Files에 대해 자세히 알아보기

제품

Community Treasure Hunt

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

Start Hunting!

Translated by