octave-maintainers
[Top][All Lists]
Advanced

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

Re: [changeset] - improve clf() compatibility


From: Ben Abbott
Subject: Re: [changeset] - improve clf() compatibility
Date: Fri, 10 Oct 2008 13:49:24 -0400

On Friday, October 10, 2008, at 01:31PM, "John W. Eaton" <address@hidden> wrote:
>On 10-Oct-2008, Ben Abbott wrote:
>
>| 
>| On Oct 10, 2008, at 7:54 AM, Michael Goffioul wrote:
>| 
>| > On Fri, Oct 10, 2008 at 1:46 PM, Ben Abbott <address@hidden> wrote:
>| >>> What's missing here is probably "reset" function.
>| >>>
>| >>> Michael.
>| >>
>| >>
>| >> Agreed.
>| >>
>| >> If I had a method available to inquire as to what the defaults  
>| >> were, that
>| >> would be easy enough to impement. Do you imply that I am already  
>| >> able to
>| >> determine the default property values?
>| >
>| > get(0, 'defaultfigurecolor') for instance
>| >
>| > However, implementing this in m-code will probably be rather  
>| > inefficient.
>| > I guess a C++ implementation (maybe with some autogenerated code)
>| > would be better suited.
>| >
>| > Michael.
>| 
>| ok, that does work in Matlab, but not in Octave's 3.1.51+ branch. Does  
>| this functionality exist somewhere else?
>
>However, setting default properties does work.  For example
>
>  figure (1);
>  get (1, "color")
>    ==> [1, 1, 1]
>
>  close ("all");
>
>  set (0, "defaultfigurecolor", [0.1, 0.2, 0.3]);
>  figure (1);
>  get (1, "color")
>    ==> [0.1, 0.2, 0.3]
>
>
>I think getting defaults is just not completely implemented yet.  Some
>things do work.  For example, I see
>
>  set (0, "defaultfigurecolor", [0.1, 0.2, 0.3]);
>  get (0, "default")
>  ans =
>  {
>    defaultfigurecolor =
>
>       0.20000   0.20000   0.20000
>
>  }
>
>  get (0, "defaultfigurecolor")
>  ans =
>
>     0.20000   0.20000   0.20000
>
>
>but as you noted, this fails when the default has not been explicitly
>set.  I guess that's just something that still needs to be done.
>
>jwe

heck, it appears all of the defaults could be handled by the functions that 
create them. Is that what should be done, or should the defaults be handled at 
a lower level.

Ben


reply via email to

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