[changeset] - x,y,zlabel/title respect axes font properties

Ben Abbott bpabbott at mac.com
Fri Oct 10 10:23:27 CDT 2008


On Oct 10, 2008, at 9:49 AM, Michael Goffioul wrote:
>
> On Thu, Oct 9, 2008 at 9:17 PM, Ben Abbott <bpabbott at mac.com> wrote:
>> I had originally thought this would be handled at a lower level,  
>> but when I played with Matlab, I was no longer sure.
>>
>> In Matlab ...
>>
>> figure
>> xlabel('Hello')
>>
>> Produces a xlabel with the font properties of the axis. If this if  
>> followed by ...
>>
>> set(get(gca,'xlabel'),'fontsize',20)
>>
>> The font changes to 20pt. If then followed by ...
>>
>> xlabel('Hello')
>>
>> The font size is again inherited from the parent axis. However, if  
>> this is followed by ...
>>
>> set(get(gca,'xlabel'),'fontsize',20)
>> set(get(gca,'xlabel'),'string','Hello Again')
>>
>> The font size remains 20pt.
>>
>> Based upon this I assumed that a low level didn't look as  
>> attractive to me as placing the solution in __axis_label__.
>>
>> Also, the text objects do not inherit their font properties from  
>> the axis (unfortunately). Which means the axis labels and title  
>> must be handled differently from text.
>>
>> Thus, I concluded the best place for this was in __axis_label__.
>>
>> However, my judgement of the c++ side is suspect, so perhaps I'm  
>> off base here.
>>
>> Ben
>
> Matlab has a special treatment for font properties of
> title and labels. Those are regular text objects that
> can be modified like other text objects, but it seems that
> Matlab uses by default the font properties of the axes object
> when the text object is recreated. This is not a system-wide
> behavior, and according to me specific to axes title and
> labels.
>
> Michael.
>


Back to John's inquiry, any thoughts regarding where/how the special  
treatment of the font properties for the title/labels should be  
handled. Is the solution of including this in plot/__axis_label__.m a  
good one? ... or should it be done at a lower level?

Ben




More information about the Octave-maintainers mailing list