comp.lang.idl-pvwave archive
Messages from Usenet group comp.lang.idl-pvwave, compiled by Paulo Penteado

Home » Public Forums » archive » Inconsistency in the position of the text() function
Show: Today's Messages :: Show Polls :: Message Navigator
E-mail to friend 
Return to the default flat view Create a new topic Submit Reply
Inconsistency in the position of the text() function [message #91235] Fri, 19 June 2015 01:42 Go to previous message
Helder Marchetto is currently offline  Helder Marchetto
Messages: 520
Registered: November 2011
Senior Member
Hi,
I'm a bit puzzled by how the position parameter of the text function works.
I expect something and get something else...
Here is a short example:

p = plot(/test)
tl = text(0.5,0.8,'test', alignment=0.0)
tc = text(0.5,0.7,'test', alignment=0.5)
tr = text(0.5,0.6,'test', alignment=1.0)
pl = polyline([0.5,0.5],[0.0,1.0],'r2',/norm)

This is all fine. If I now set the alignment parameter (to the same value!), I get what I expect (no change):

tl.alignment=0.0
tc.alignment=0.5
tr.alignment=1.0

But if I set the position parameter, everything is center justified:

tl.position=[0.5,0.8]
tc.position=[0.5,0.7]
tr.position=[0.5,0.6]

Now the text is centered on the position keyword and the "alignment" parameter is not respected anymore.

Is this what one expects? I didn't expect this...

Cheers,
Helder
[Message index]
 
Read Message
Read Message
Read Message
Previous Topic: problem in reading unformatted data from a FORTRAN file
Next Topic: Problem with text()

-=] Back to Top [=-
[ Syndicate this forum (XML) ] [ RSS ] [ PDF ]

Current Time: Wed Oct 08 11:30:26 PDT 2025

Total time taken to generate the page: 0.00455 seconds