Why do I receive an error when I create a figure containing a contour plot and a colorbar in MATLAB 7.0.4 (R14SP2)?
조회 수: 1 (최근 30일)
이전 댓글 표시
I create a figure with a contour plot and a colorbar using the following code:
load flujet
h=image(X);
hold on;
[c,hc]=contour(get(h,'cdata'),[1 1],'w','linewidth',2);
colorbar
When I do this, I get the following error message:
??? Error using ==> set
Bad value for axes property: 'YLim'
Values must be increasing and non-NaN.
Error in ==> colorbar>make_colorbar at 170
ch=scribe.colorbar(peeraxes,location,position,pvpairs{:});
Error in ==> colorbar at 137
[c,msg] = make_colorbar(peeraxes,location,position,pvpairs);
채택된 답변
MathWorks Support Team
2009년 6월 27일
This bug has been fixed in Release 14 Service Pack 3 (R14SP3). For previous product releases, read below for any possible workarounds:
There is a bug in MATLAB 7.0.4 (R14SP2) that causes the COLORBAR function to incorrectly determine the upper and lower limits of the colorbar.
To work around this issue, you can do the following:
load flujet
h=image(X);
hold on;
colorbar
[c,hc]=contour(get(h,'cdata'),[1 1],'w','linewidth',2);
댓글 수: 0
추가 답변 (0개)
참고 항목
카테고리
Help Center 및 File Exchange에서 Contour Plots에 대해 자세히 알아보기
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!