On 5-Oct-2010, John W. Eaton wrote:
| On 5-Oct-2010, Ben Abbott wrote:
|
| | I had a typo in my first attempt Using Matlab, this works for me.
| |
| | fcn = @(varargin) set (get (gca, 'ylabel'), 'rotation', 0, 'horizontalalignment', 'right');
| | set (0, 'defaultaxescreatefcn', fcn)
|
| Thanks This doesn't work in Octave yet, so I've filed a bug report
| about it so we will remember to look at the problem.
The problem is with recursion because the callback function, which is
executed by gca, also calls gca. Matlab avoids the recursion, but I'm
not sure how. But the handle of the object that is being created is
passed to the createfcn callback, so you can write
fcn = @(h) set (get (h, 'ylabel'), 'rotation', 0,
'horizontalalignment', 'right');
to avoid the recursion and it will also work in Octave.
jwe