[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: default properties for axis label objects
From: |
Ben Abbott |
Subject: |
Re: default properties for axis label objects |
Date: |
Tue, 05 Oct 2010 08:05:11 -0400 |
On Oct 5, 2010, at 7:41 AM, Ben Abbott wrote:
> On Oct 5, 2010, at 3:42 AM, John W. Eaton wrote:
>
>> I was recently asked about setting the default value of the "rotation"
>> property for y-axis labels to 0 instead of 90, so that all new plots
>> would have the y-axis label oriented the same as the x-axis label.
>> Currently, the y-axis label is always rotated 90 degrees
>> counterclockwise.
>>
>> It seems there is no way to do this for Octave because each time an
>> axis object is created, new text objects are created for the x-, y-,
>> and z-axis labels and with all the factory default settings and there
>> is code in axes::properties::init in src/graphics.cc that explicitly sets the
>> rotation property for the y-axis label to 90. So I see no way to set
>> defaults, at least in Octave. Is there some way to accomplish this
>> task in Matlab? If so, how?
>>
>> jwe
>
> I don't know how to do that either.
>
> I would have thought that DefaultAxisCreateFcn could be modified to do the
> job, but Matlab doesn't allow me to set the default createfcn for axis
> objects ... which leaves me wondering how that property is even useful.
>
> Ben
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)
Ben
- default properties for axis label objects, John W. Eaton, 2010/10/05
- Re: default properties for axis label objects, Ben Abbott, 2010/10/05
- Re: default properties for axis label objects,
Ben Abbott <=
- Re: default properties for axis label objects, John W. Eaton, 2010/10/05
- Re: default properties for axis label objects, John W. Eaton, 2010/10/05
- Re: default properties for axis label objects, bpabbott, 2010/10/05
- Re: default properties for axis label objects, John W. Eaton, 2010/10/06
- Re: default properties for axis label objects, Ben Abbott, 2010/10/06