octave-maintainers
[Top][All Lists]
Advanced

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

'cla reset' clears user properties?


From: Rik
Subject: 'cla reset' clears user properties?
Date: Thu, 23 Jan 2014 10:30:07 -0800

1/23/14

All,

What do people think the following code should do?

close all
hax = gca;
addproperty ("__foobar__", hax, "data", [1 2])
cla reset
isprop (hax, "__foobar__")

The current behavior is to preserve the user property across the reset.  I
consider that a little odd from the documentation which states:

 -- Command:  cla
 -- Command:  cla reset
 -- Function File:  cla (HAX)
 -- Function File:  cla (HAX, "reset")
     Clear the current axes.

     `cla' operates by deleting child graphic objects with visible
     handles (HandleVisibility = "on").

     If the optional argument "reset" is specified, delete all child
     objects including those with hidden handles and reset all axis
     properties to their defaults.  However, the following properties
     are not reset: Position, Units.

It seems to me that 'cla' by itself should delete axis children, but
preserve any properties such as tick labels or log scale.  However, 'cla
reset' seems like it was meant to restore the axis to a practically
original state and should remove the user properties.  As it is, it
restores any axis properties that have defaults (factory or user-specified)
to default states, but doesn't touch user properties for which it has no
information.  Any votes one way or another?

--Rik


reply via email to

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