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: Ben Abbott
Subject: Re: [changeset] - x,y,zlabel/title respect axes font properties
Date: Fri, 10 Oct 2008 11:23:27 -0400

On Oct 10, 2008, at 9:49 AM, Michael Goffioul wrote:

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

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




reply via email to

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