Effacer les filtres
Effacer les filtres

Error in contour dependent on number of specified levels

1 vue (au cours des 30 derniers jours)
Robert
Robert le 14 Sep 2012
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.

Réponses (0)

Catégories

En savoir plus sur Contour Plots dans Help Center et File Exchange

Tags

Produits

Community Treasure Hunt

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

Start Hunting!

Translated by