Paul Brenner wrote: > > > I have searched through the nathworks site and googled extensively > but have found no simple scripts or explanations regarding how to > automatically generate a legend for contour plots. I have toyed > around with the clabel functionality but would much prefer a legend > of values for each contour line color/type as opposed to placing > the > numerical values on or near the contour lines which makes it more > difficult to read. Thanks for any guidance.
If you use contour without any 'line specification' it takes color values from the figure colormap. In this case just use 'colorbar' to get a 'legend'. This is the same procuedyre you would use for surface (surf) or image (imagesc) plots.