help-octave
[Top][All Lists]

## Re: Specifying RGB triples

 From: Søren Hauberg Subject: Re: Specifying RGB triples Date: Thu, 21 Apr 2011 12:27:41 +0200

```tor, 21 04 2011 kl. 02:40 -0700, skrev Sergei Steshenko:
>
> --- On Thu, 4/21/11, Søren Hauberg <address@hidden> wrote:
>
> > From: Søren Hauberg <address@hidden>
> > Subject: Re: Specifying RGB triples
> > To: "Sergei Steshenko" <address@hidden>
> > Date: Thursday, April 21, 2011, 1:58 AM
> > tor, 21 04 2011 kl. 01:14 -0700,
> > skrev Sergei Steshenko:
> > >
> > > --- On Thu, 4/21/11, Søren Hauberg <address@hidden>
> > wrote:
> > >
> > > > From: Søren Hauberg <address@hidden>
> > > > Subject: Re: Specifying RGB triples
> > > > To: "pathematica" <address@hidden>
> > > > Cc: address@hidden
> > > > Date: Thursday, April 21, 2011, 12:06 AM
> > > > ons, 20 04 2011 kl. 23:56 -0700,
> > > > skrev pathematica:
> > > [snip]
> > > >   plot (sin (1:100), 'color',
> > [0.9, 0.2, 0.2])
> > > [snip]
> > > >
> > > > Søren
> > > >
> > > >
> > >
> > > Is this described anywhere in Octave documentation ?
> >
> > I don't know.
> >
> > > And how this can be understood from "get(gcf())"
> > output ?
> >
> > "get(gcf())" just gives you a list of figure properties,
> > such as the
> > size of the figure, etc. The above colour-stuff is the
> > property of a
> > specific plot element. You should be able to get related
> > information by
> > doing something like
> >
> >   handle = plot (sin (1:100));
> >   get (handle)
> >
> > Søren
> >
> >
>
> You example among other things produces:
>
> "
>   color =
>
>      0   0   1
> ".
>
> How am I supposed from the above output to know that 'color' should be
> specified as vector and not as, say, string or cell array ?

In general, I guess you cannot tell if a property should be a string, a
vector or something else just by looking the output of 'get'. However,
you can most often figure it out just by playing a bit with things
(that's the great part about interpreted languages: you can just try out
a theory and see if it works).

I know this is not the optimal answer, but it's all I got...

Søren

```