Why are my plot labels spontaneously changing?
Mostrar comentarios más antiguos
I have pcolor plots with line plots overlaid that I generated and saved in an older version of matlab (2009a). In the old version, I changed the plot labels manually (the y-axis units were in 500 meter increments, but I changed the labels to reflect km via the ticks button in the figure editor). When I open the .fig files in matlab 2012b, the labels are initially correct (ie, as I saved them), but as soon as I maximize the figure, re-save the figure, or even put the figure into the figure editor, the y-axis labels change spontaneously. They should reflect a range of 0-8 km and instead are either reflecting 0-4, 0-2, or 0-1 km ranges, depending on the scale of the figure. I don't know why this is happening, but I'm really freaking out. I have hundreds of figures for my research, and luckily I caught this issue right away. I opened one such old (ie. correct) figure, and hit save. Although it was still correct at this point, it re-saved the figure with y-axis values of [0 1 2 3 4] instead of [0 1 2 3 4 5 6 7 8] and changed the current view of the figure. The original data points were [0 500 1,000 1,500 2,000 etc...] with me having deleted the labels for the 500 m increments.
Respuestas (1)
Walter Roberson
el 29 de Mzo. de 2013
0 votos
YTickMode manual
2 comentarios
Jennifer Davison
el 29 de Mzo. de 2013
Editada: Jennifer Davison
el 29 de Mzo. de 2013
Walter Roberson
el 29 de Mzo. de 2013
Perhaps, after you open the figure but before you resize it,
set( findall(FigureNumber, 'type', 'axes'), 'YTickMode', 'manual' )
Categorías
Más información sobre Creating, Deleting, and Querying Graphics Objects en Centro de ayuda y File Exchange.
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!