Error in contour dependent on number of specified levels
1 回表示 (過去 30 日間)
古いコメントを表示
I have a matrix named ch1 that contains no inf or nan elements. The matrix has the X label time, and Y label marks. When I try to make a contour plot using:
contour(time,marks, ch1,15,'fill','on');
I get the following error:
Error using patch
Color value contains NaN, or element out of range 0.0 <= value <= 1.0
Error in specgraph.contourgroup/refresh>LdrawFilled (line 403)
cu=patch(xp,yp,clev,'FaceColor','flat','UserData',lev,patchpairs{:});
Error in specgraph.contourgroup/refresh (line 207)
LdrawFilled(this);
Error in specgraph.contourgroup/schema>LdoDirtyAction (line 265)
refresh(h);
The error disappears if I specify 16 or 20 levels rather than 15, but I still get the error when specifying 14 or 10 levels. There is no dependence on XData, YData, or the filled option. This must be some kind of bug in contour, since the error is dependent on the number of contour levels. I could provide the offending matrix if anyone is interested.
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!