Why do my CONTOUR lines disappear when I shade my plot using the SHADING function in MATLAB 7.1 (R14SP3)?
Show older comments
I want to label and apply shading to my CONTOUR plot. When I execute the following commands in MATLAB 7.1 (R14SP3), my labels remain, but my contour lines disappear.
[X,Y] = meshgrid(-2:.2:2,-2:.2:3);
Z = X.*exp(-X.^2-Y.^2);
pcolor(X,Y,Z);
caxis([-2 3]);
hold on
[C,h] = contour(X,Y,Z,'k');
clabel(C,h,'FontSize',8,'color','k');
shading interp
Accepted Answer
More Answers (0)
Categories
Find more on Surface and Mesh Plots in Help Center and File Exchange
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!