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

10 vues (au cours des 30 derniers jours)
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 commentaires
mush wajat
mush wajat le 20 Avr 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 le 20 Avr 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.

Connectez-vous pour commenter.

Réponses (0)

Community Treasure Hunt

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

Start Hunting!

Translated by