legend on contour plot

View: New views
5 Messages — Rating Filter:   Alert me  

legend on contour plot

by ronneh :: Rate this Message:

Reply to Author | View Threaded | Show Only this Message

hi,

maybe it's to simple but i don't get it.
there must be a way to get either a legend or the contour lines itself labled.
how is it done ?


And by just saying:  legend(legendentries) it doesn't work.


roland  

Re: legend on contour plot

by David Bateman :: Rate this Message:

Reply to Author | View Threaded | Show Only this Message

ronneh wrote:
> hi,
>
> maybe it's to simple but i don't get it.
> there must be a way to get either a legend or the contour lines itself
> labled.
> how is it done ?
>
> roland  
>  
There is no way yet to label the contour lines.. The only legend
possible at the moment is with "colorbar()". See

contour(peaks)
colorbar


D.

--
David Bateman                                David.Bateman@...
Motorola Labs - Paris                        +33 1 69 35 48 04 (Ph)
Parc Les Algorithmes, Commune de St Aubin    +33 6 72 01 06 33 (Mob)
91193 Gif-Sur-Yvette FRANCE                  +33 1 69 35 77 01 (Fax)

The information contained in this communication has been classified as:

[x] General Business Information
[ ] Motorola Internal Use Only
[ ] Motorola Confidential Proprietary

_______________________________________________
Help-octave mailing list
Help-octave@...
https://www.cae.wisc.edu/mailman/listinfo/help-octave

Parent Message unknown Re: legend on contour plot

by Marco Caliari-4 :: Rate this Message:

Reply to Author | View Threaded | Show Only this Message

> 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@...
https://www.cae.wisc.edu/mailman/listinfo/help-octave

Re: legend on contour plot

by Henry F. Mollet :: Rate this Message:

Reply to Author | View Threaded | Show Only this Message

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@... 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@...
> https://www.cae.wisc.edu/mailman/listinfo/help-octave


_______________________________________________
Help-octave mailing list
Help-octave@...
https://www.cae.wisc.edu/mailman/listinfo/help-octave

Re: legend on contour plot

by dbateman3 :: Rate this Message:

Reply to Author | View Threaded | Show Only this Message

Henry F. Mollet wrote:
> 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.
>

Maybe if you did

[x,y,z] = peaks();
contour(x,y,z);

you'd see what you expect

D.

_______________________________________________
Help-octave mailing list
Help-octave@...
https://www.cae.wisc.edu/mailman/listinfo/help-octave