Why X-axis values change after saving the figure in .jpeg or .tif format? How can I rectify it?

조회 수: 10 (최근 30일)
I am using time on my x-axis and some data on y-axis. Code is given below:
dataset=[1 2 .... 144]; % Any array of 144 points
t = duration(1/6:1/6:24,10,0,'Format','hh:mm');
plot(t,dataset);
it gives a plot shown in the first figure however when I try to save it in .jpeg or .tif format it automatically changes the x-axis to show all values giving all the values on top of each other?
  댓글 수: 3
mush wajat
mush wajat 2018년 4월 20일
Walter Roberson I am using R2015a and windows 10 I am saving the file using "save as" option in the figure dialog box once the figure is plotted and I have changed the size of figure from "export setup" to width=3.42inch height=3inch. I am selecting .tif format to save. You are right. Is there a way to specify only selected points that gets shown on x-axis manually? so that they don't get jammed when I save the figure in a small size.
mush wajat
mush wajat 2018년 4월 20일
Found the solution using set(gca,'XTick',[0 1/6 1/3 1/2 2/3 5/6 1]) I was able to obtain xticks at selected point. Thank you Walter Roberson for your valuable insight.

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

답변 (0개)

카테고리

Help CenterFile Exchange에서 Annotations에 대해 자세히 알아보기

Community Treasure Hunt

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

Start Hunting!

Translated by