help-octave
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Key by default


From: Henry F. Mollet
Subject: Key by default
Date: Thu, 30 Aug 2007 19:22:47 -0700
User-agent: Microsoft-Entourage/11.1.0.040913

I'm using 
GNU Octave, version 2.9.13/gnuplot-4.2/ export GNUTERM=x11 on a Mac.

octave-2.9.13:15> [x,y,z]=peaks;
octave-2.9.13:16> contour(x,y,z)
octave-2.9.13:17> get (gca)

This produces the contours for peaks.m in grey-scale without a key.
I suggest that we need a key for the contour lines as was produced by
default in octave-2.1.71/gnuplot-4.0. The default contours were for z-values
from +8 to-6 in steps of 2 in color.

How do I get a (contour) key in Octave-2.9.13? When using plot.m, following
help, I know how to produce the key but I suggest that this will not be too
helpful for contours: 1) I don't know the values for the contours (they are
different from what is being used in gnuplot-4.0)  and 2) it would be
cumbersome if one had to input a complete key.

Inspecting gca, I see that key = off, so I turn it on:

octave-2.9.13:19> key=get(gca,'key')
key = off
octave-2.9.13:20> key = 'on'
key = on
octave-2.9.13:21> set (gca,'key',key)
octave-2.9.13:22> get (gca)

This has no effect and does not produce the key.

I am able to change the gca/plot in other ways, for example the following
works:
octave-2.9.13:31> xtick = get (gca, 'xtick')
xtick = [](0x0)
% xtick is not really [](0x0) because xtickmode = auto is used
octave-2.9.13:34> xtick=[-2,-1,0,1,2]
xtick =
  -2  -1   0   1   2
octave-2.9.13:35> set (gca, 'xtick', xtick)
This will change the xticks and their labels to about half of the default
xticks.

I see that the gca contains the following:
children =

   Columns 1 through 15:

    -24  -23  -22  -21  -20  -19  -18  -17  -16  -15  -14  -13  -12  -11
-10

   Columns 16 and 17:

     -9   -8

Perhaps this is the 'code' for the contours but how do I figure out their
value and then I still have to turn on the key using these values.

Henry






reply via email to

[Prev in Thread] Current Thread [Next in Thread]