[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Octave-bug-tracker] [bug #33163] The "extent" property for text objects
From: |
Daniel Wagenaar |
Subject: |
[Octave-bug-tracker] [bug #33163] The "extent" property for text objects has incorrect position encoded. Patch attached. |
Date: |
Tue, 26 Apr 2011 04:51:12 +0000 |
User-agent: |
Mozilla/5.0 (X11; U; Linux x86_64; en-US; rv:1.9.2.16) Gecko/20110323 Ubuntu/10.10 (maverick) Firefox/3.6.16 |
URL:
<http://savannah.gnu.org/bugs/?33163>
Summary: The "extent" property for text objects has incorrect
position encoded. Patch attached.
Project: GNU Octave
Submitted by: wagenaar
Submitted on: Tue 26 Apr 2011 04:51:11 AM GMT
Category: Plotting
Severity: 3 - Normal
Priority: 5 - Normal
Item Group: Incorrect Result
Status: None
Assigned to: None
Originator Name: Daniel Wagenaar
Originator Email:
Open/Closed: Open
Discussion Lock: Any
Release: dev
Operating System: GNU/Linux
_______________________________________________________
Details:
In either gnuplot or fltk, if I create a simple plot, e.g.,
plot([1:5],[1:5].^2);
annotate it with some text, e.g.,
t = text(2,7,'Hello world');
and request the extent of that text:
ext = get(t,'extent')
I get the wrong answer:
ext =
0.99078 -0.54777 0.48848 0.94946
instead of
ext =
1.99078 6.4522 0.48848 0.94946
As the author of the original "extent" implementation, Michael Goffioul,
points out, this is because the (x,y) coordinates of the extent are based on
the axis range rather than the "position" of the text object.
I am attaching a patch to correct this problem.
_______________________________________________________
File Attachments:
-------------------------------------------------------
Date: Tue 26 Apr 2011 04:51:11 AM GMT Name: text-extent-patch.txt Size: 1kB
By: wagenaar
<http://savannah.gnu.org/bugs/download.php?file_id=23306>
-------------------------------------------------------
Date: Tue 26 Apr 2011 04:51:11 AM GMT Name: ChangeLog-entry Size: 283B By:
wagenaar
<http://savannah.gnu.org/bugs/download.php?file_id=23307>
_______________________________________________________
Reply to this item at:
<http://savannah.gnu.org/bugs/?33163>
_______________________________________________
Message sent via/by Savannah
http://savannah.gnu.org/
- [Octave-bug-tracker] [bug #33163] The "extent" property for text objects has incorrect position encoded. Patch attached.,
Daniel Wagenaar <=