legend on contour plot

Henry F. Mollet mollet at pacbell.net
Sat Feb 9 18:21:17 CST 2008


I have the same problem. Using peaks() shows that axis should be axis ([-3,
3, -3, 3]) and that the contours should be between -6 and + 6. It appears
that the axis, when using contour (peaks) are based on the default mesh
value N-by-N = 49.

Function File: [X, Y, Z] = peaks (...)
     Generate a function with lots of local maxima and minima. The
     function has the form

     f(x,y) = 3*(1-x)^2*exp(-x^2 - (y+1)^2) ...
              - 10*(x/5 - x^3 - y^5)*exp(-x^2-y^2) ...
              - 1/3*exp(-(x+1)^2 - y^2)

     Called without a return argument, `peaks' plots the surface of the
     above function using `mesh'. If N is a scalar, the `peaks' returns
     the values of the above function on a N-by-N mesh over the range
     `[-3,3]'. The default value for N is 49.

Henry

on 2/9/08 12:09 AM, Marco Caliari at marco.caliari at univr.it wrote:

>> There is no way yet to label the contour lines.. The only legend
>> possible at the moment is with "colorbar()". See
>> 
>> contour(peaks)
>> colorbar
> 
> I see... nothing. White empty room is created on the right, but no color
> bar. Moreover, the axes limits are not correct: a level curve is cutted on
> the top. GNU Octave 3.0.0 for Windows.
> 
> Marco
> _______________________________________________
> Help-octave mailing list
> Help-octave at octave.org
> https://www.cae.wisc.edu/mailman/listinfo/help-octave




More information about the Help-octave mailing list