octave-maintainers
[Top][All Lists]
Advanced

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

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


From: Michael Goffioul
Subject: Re: [changeset] - x,y,zlabel/title respect axes font properties
Date: Fri, 10 Oct 2008 15:49:11 +0200

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.


On Thu, Oct 9, 2008 at 9:17 PM, Ben Abbott <address@hidden> 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
>
>
>


reply via email to

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