octave-maintainers
[Top][All Lists]
Advanced

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

Re: Text extent implemented (partially)


From: Michael Goffioul
Subject: Re: Text extent implemented (partially)
Date: Tue, 9 Mar 2010 14:21:06 +0000

On Tue, Mar 9, 2010 at 2:01 PM, Ben Abbott <address@hidden> wrote:
> I find it confusing to when there are multiple coordinate systems. Perhaps it 
> is best to give an example?

Yes indeed.

>
> For Matlab (left, bottom) of the text extent is with respect to the axes 
> coordinate system, with the units specified by the text object.
>
>>> plot(1:10)
>>> h = text (5,5,'Hello World');
>>> get (h, 'extent')
>
> ans =
>
>       4.9517       4.7522       1.3862      0.41983
>
> The same example in Octave gives ...
>
> octave:7> get (h, 'extent')
> ans =
>
>  -0.00000   0.00000   1.86636   0.52585

Currently in octave, the first 2 values of the extent property will
always be the lower
left corner of the axes box in Units coordinates. In the above
example, the axes is
in 2D mode and I guess the autoscale sets X and Y limits to something
like [0 10].
This means that the lower left corner of the axes boxes is at data
coordinates [0 0].
If you set text Units to "pixels", the first 2 values will be [1 1]
(pixels cooredinates are
always 1-based).

Michael.



reply via email to

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