help-octave
[Top][All Lists]
Advanced

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

## Re: Specifying RGB triples

 From: Andy Buckle Subject: Re: Specifying RGB triples Date: Thu, 21 Apr 2011 12:29:20 +0100

```On Thu, Apr 21, 2011 at 10:40 AM, Sergei Steshenko <address@hidden> wrote:
>
>
> --- 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>
>> Cc: 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 ?
>
> Thanks,
>  Sergei.

The "above output" alone won't tell you. But the following does not
seem too stressful.

>c=get (gca(),'color')
c =

1   1   1

>whos c
Variables in the current scope:

Attr Name        Size                     Bytes  Class
==== ====        ====                     =====  =====
c           1x3                         24  double

Total is 3 elements using 24 bytes

--
/* andy buckle */

```

reply via email to

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