Re: Legends for filled contour plots



In article <1183133878.959978.78100@xxxxxxxxxxxxxxxxxxxxxxxxxxxx>,
Pradeep <drppbhat@xxxxxxxxx> wrote:
Could someone tell me how to obtain a legend for (filled) contour
plots using MATLAB. Thanks.

Does 'colorbar' do what you want?

This is what I am doing: from a grid-based computation data (in my
case, FEM), I use patch to plot ``patch graphics" and then use
interpolated shading. Is there someway to make MATLAB show the levels
(of the field values) to which the colors (from shading) correspond?
Is there also a way to control the number of levels in the
interpolated shading?

From the documentation:
"colormap(hsv(128)) creates an hsv colormap with 128 colors. If you do
not specify a size, MATLAB creates a colormap the same size as the
current colormap."

This assumes equal spacing of you colour-value mapping.

Francis
.



Relevant Pages

  • Legends for filled contour plots
    ... plots using MATLAB. ... case, FEM), I use patch to plot ``patch graphics" and then use ... interpolated shading. ... Is there someway to make MATLAB show the levels ...
    (comp.soft-sys.matlab)
  • Re: Problems saving plot to .png with -nodisplay switch
    ... I am having problems saving plots to a png file when running matlab ... I run most of my matlab scripts in batch-mode so saving plots to disk ... or any of its super-classes ... Warning: Objects of graphics.zoombehavior class exist - not clearing ...
    (comp.soft-sys.matlab)
  • Re: Problems saving plot to .png with -nodisplay switch
    ... I am having problems saving plots to a png file when running matlab ... I run most of my matlab scripts in batch-mode so saving plots to disk ... or any of its super-classes ... Warning: Objects of graphics.zoombehavior class exist - not clearing ...
    (comp.soft-sys.matlab)
  • Re: Nyquist by hand
    ... everyone has at least a student version of Matlab available. ... Does anybody really use Nyquist or Nichols plots? ... I can see using Bode plots. ... Do you need to implement control loops in software? ...
    (sci.engr.control)
  • Re: Nyquist by hand
    ... everyone has at least a student version of Matlab available. ... Does anybody really use Nyquist or Nichols plots? ... Nyquist plots with a calculator and graph paper. ... Some years ago, my father-in-law, a cardiologist asked what I thought of a new scheme some company was pushing called a vector cardiogram. ...
    (sci.engr.control)