Why are my plot labels spontaneously changing?
조회 수: 11 (최근 30일)
이전 댓글 표시
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.
댓글 수: 0
답변 (1개)
Walter Roberson
2013년 3월 29일
YTickMode manual
댓글 수: 2
Walter Roberson
2013년 3월 29일
Perhaps, after you open the figure but before you resize it,
set( findall(FigureNumber, 'type', 'axes'), 'YTickMode', 'manual' )
참고 항목
카테고리
Help Center 및 File Exchange에서 Creating, Deleting, and Querying Graphics Objects에 대해 자세히 알아보기
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!