Why are my plot labels spontaneously changing?

6 Ansichten (letzte 30 Tage)
Jennifer Davison
Jennifer Davison am 29 Mär. 2013
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.

Antworten (1)

Walter Roberson
Walter Roberson am 29 Mär. 2013
  2 Kommentare
Jennifer Davison
Jennifer Davison am 29 Mär. 2013
Bearbeitet: Jennifer Davison am 29 Mär. 2013
Thanks for your post (and pardon my continued frustration). While it better explains the problem, it doesn't actually fix it. The crux of the matter seems to be that: 1) either the "manual" mode for the figure's tick marks is not preserved when the file was opened in the newer matlab version, or 2) it is not truly backwards compatible with the older versions. The figure axes are not being re-labeled in the matlab version I generated them in and although I could fix every figure for the new version, this would be a massive waste of time since I still have access to the old version on a different machine.
To the folks at matlab, this could generate HUGE unanticipated problems for the scientific community. I just finished final reviews for 3 journal articles that have been accepted for publication with minor revisions. I needed to make higher quality figure files for the journals and almost insert figures with bad axes due to this issue. Luckily, it was caught right away. Others might not be so lucky. This is truly not acceptable.
Walter Roberson
Walter Roberson am 29 Mär. 2013
Perhaps, after you open the figure but before you resize it,
set( findall(FigureNumber, 'type', 'axes'), 'YTickMode', 'manual' )

Melden Sie sich an, um zu kommentieren.

Kategorien

Mehr zu Creating, Deleting, and Querying Graphics Objects finden Sie in Help Center und File Exchange

Community Treasure Hunt

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

Start Hunting!

Translated by