problem with default radio property values?

classic Classic list List threaded Threaded
3 messages Options
Reply | Threaded
Open this post in threaded view
|

problem with default radio property values?

bpabbott
Administrator
I noticed that many default values are properly reported

        octave:2> get (0, "defaultaxesposition")
        ans =   0.13000   0.11000   0.77500   0.81500

        octave:3> get (0, "defaultaxesticklength")
        ans =   0.010000   0.025000

But some others are not

        octave:4> get (0, "defaultaxesunits")
        ans = 0

        octave:5> get (0, "defaultaxesfontunits")
        ans = 0

        octave:6> get (0, "defaulttextfontunits")
        ans = 0

        octave:7> get (0, "defaultaxestickdir")
        ans = 0

 From what I can tell all radio properties behave this way. I  
experimented with placing ...

        units = "normalized";

... in axes::properties::set_defaults, but the behavior did not  
change. Nor does it work for the other radio properties whose defaults  
are already specified there.

Is this a bug, or the result of a work in progress that has not yet  
been completed?

In any event, is there presently a way to determine the default value  
for a radio property from an m-file?

Ben

Reply | Threaded
Open this post in threaded view
|

problem with default radio property values?

John W. Eaton
Administrator
On 16-Feb-2009, Ben Abbott wrote:

| I noticed that many default values are properly reported
|
| octave:2> get (0, "defaultaxesposition")
| ans =   0.13000   0.11000   0.77500   0.81500
|
| octave:3> get (0, "defaultaxesticklength")
| ans =   0.010000   0.025000
|
| But some others are not
|
| octave:4> get (0, "defaultaxesunits")
| ans = 0
|
| octave:5> get (0, "defaultaxesfontunits")
| ans = 0
|
| octave:6> get (0, "defaulttextfontunits")
| ans = 0
|
| octave:7> get (0, "defaultaxestickdir")
| ans = 0
|
|  From what I can tell all radio properties behave this way. I  
| experimented with placing ...
|
| units = "normalized";
|
| ... in axes::properties::set_defaults, but the behavior did not  
| change. Nor does it work for the other radio properties whose defaults  
| are already specified there.
|
| Is this a bug, or the result of a work in progress that has not yet  
| been completed?
|
| In any event, is there presently a way to determine the default value  
| for a radio property from an m-file?

I checked in the following change.

  http://hg.savannah.gnu.org/hgweb/octave/rev/8cb2a144f321

Most of it is whitespace changes.  The real fix is to use

  dval = "\"" substr (dval, 1, l-1) "\"";

instead of

  dval = "\"" + substr (dval, 1, l-1) + "\"";

to concatenate character strings in AWK.

Thanks,

jwe
Reply | Threaded
Open this post in threaded view
|

Re: problem with default radio property values?

bpabbott
Administrator

On Feb 16, 2009, at 2:46 PM, John W. Eaton wrote:

> On 16-Feb-2009, Ben Abbott wrote:
>
> | I noticed that many default values are properly reported
> |
> | octave:2> get (0, "defaultaxesposition")
> | ans =   0.13000   0.11000   0.77500   0.81500
> |
> | octave:3> get (0, "defaultaxesticklength")
> | ans =   0.010000   0.025000
> |
> | But some others are not
> |
> | octave:4> get (0, "defaultaxesunits")
> | ans = 0
> |
> | octave:5> get (0, "defaultaxesfontunits")
> | ans = 0
> |
> | octave:6> get (0, "defaulttextfontunits")
> | ans = 0
> |
> | octave:7> get (0, "defaultaxestickdir")
> | ans = 0
> |
> |  From what I can tell all radio properties behave this way. I
> | experimented with placing ...
> |
> | units = "normalized";
> |
> | ... in axes::properties::set_defaults, but the behavior did not
> | change. Nor does it work for the other radio properties whose  
> defaults
> | are already specified there.
> |
> | Is this a bug, or the result of a work in progress that has not yet
> | been completed?
> |
> | In any event, is there presently a way to determine the default  
> value
> | for a radio property from an m-file?
>
> I checked in the following change.
>
>  http://hg.savannah.gnu.org/hgweb/octave/rev/8cb2a144f321
>
> Most of it is whitespace changes.  The real fix is to use
>
>  dval = "\"" substr (dval, 1, l-1) "\"";
>
> instead of
>
>  dval = "\"" + substr (dval, 1, l-1) + "\"";
>
> to concatenate character strings in AWK.
>
> Thanks,

I just finished a fresh build, and the defaults work as expected.

Thanks