octave-maintainers
[Top][All Lists]
Advanced

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

Re: Graphics: Title and label properties


From: Shai Ayal
Subject: Re: Graphics: Title and label properties
Date: Sun, 20 Jul 2008 18:36:34 +0300



On Sun, Jul 20, 2008 at 6:29 PM, Michael Goffioul <address@hidden> wrote:
On Sun, Jul 20, 2008 at 10:35 AM, Maciek Gajewski
<address@hidden> wrote:
> Hello
>
> I've noticed that current axes code doesn't takes special care for title and
> x/y/(z) label items. They are created when appropriate, but I think (and
> compatibility suggest) that axes should initialize they properties, and then
> update them when needed.
>
> Especially:
>
> - positions of all these labels should be updated whenever xlim/ylim/zlim
> changes, so labels and title are painted in proper positions,
> - clipping should be set off, so labels can be displayed outside axes plot
> box,
> - y-label should be rotated 90 degrees
> etc.
>
> This could be done in backend, but IMO octave should take care of this. Are
> there any plans to do it? If no, I'd like to do it .

Help is always welcome. These kind of things (let's call it label/title
auto-location) are currently handled in the OpenGL renderer, when the
axes is rendered. This is probably not the best place, but this seemed
convenient (as a first draft), because placing correctly the labels
involves knowledge of rendering information like the font metrics.

Placing correctly the labels and title means determining the position,
the rotation and the Horz./Vert. alignment. This must take into account
the current axes transformation (2D/3D, azimuth and elevation angles...),
but also the tick marks length and text (both font metric and actual text.
For instance, taking your remark above that the y-label should be
rotated 90 degrees, this is only true for plain-2D (azimuth=0, elevation=90).

AFAIK Shai is working on the text engine, including an interface to
get font metrics. This should help in placing the labels correctly. But
definitely, this auto-location should be taken out of the OpenGL
renderer. So, again, help is always welcome.

Sadly "Working  on it" is highly exaggerated :( . I'm afraid I have been unable to contribute for the last two-three months. So, please proceed w/o me if you want. I'll try to join in later if I can commit the time ...

Shai


reply via email to

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