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

10 visualizaciones (últimos 30 días)
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 comentarios
mush wajat
mush wajat el 20 de Abr. de 2018
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 el 20 de Abr. de 2018
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.

Iniciar sesión para comentar.

Respuestas (0)

Community Treasure Hunt

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

Start Hunting!

Translated by