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

Home » Public Forums » archive » XYOUTS and ORIENTATION keyword: use negative values to anchor on end of string
Show: Today's Messages :: Show Polls :: Message Navigator
E-mail to friend 
Switch to threaded view of this topic Create a new topic Submit Reply
XYOUTS and ORIENTATION keyword: use negative values to anchor on end of string [message #93573] Wed, 24 August 2016 11:31 Go to next message
MarioIncandenza is currently offline  MarioIncandenza
Messages: 231
Registered: February 2005
Senior Member
IDL folks,

There's a pretty good chance I have this wrong, but I'm at least pretty sure the documentation is also wrong. If someone knows the definitive answer, please post it here for everyone.

Basically, when ORIENTATION is used, setting ALIGNMENT=1.0 will still anchor the text at the start, meaning the position argument passed to XYOUTS will be the start of the string. However, if a negative value is passed to ORIENTATION, the position argument will be the end of the string, which IMO is what ALIGN=1 should do. This does not appear to be documented in the XYOUTS docs or the documentation for the ORIENTATION graphic keyword.

--Edward H.
Re: XYOUTS and ORIENTATION keyword: use negative values to anchor on end of string [message #93574 is a reply to message #93573] Wed, 24 August 2016 11:45 Go to previous message
wlandsman is currently offline  wlandsman
Messages: 743
Registered: June 2000
Senior Member
I don't see this (if I understand you right). In the code sample below, the text is anchored at the end of the string for both orient=45 and orient = -45
--Wayne

IDL> plot,indgen(10)
IDL> xyouts,3,3,'This is text',orient=45,align=1
IDL> xyouts,3,3,'This is text',orient=-45,align=1
IDL> !version
{
"ARCH": "x86_64",
"OS": "darwin",
"OS_FAMILY": "unix",
"OS_NAME": "Mac OS X",
"RELEASE": "8.5.1",
"BUILD_DATE": "Nov 14 2015",
"MEMORY_BITS": 64,
"FILE_OFFSET_BITS": 64
}

On Wednesday, August 24, 2016 at 2:31:43 PM UTC-4, Edward Hyer wrote:
> IDL folks,
>

> There's a pretty good chance I have this wrong, but I'm at least pretty sure the documentation is also wrong. If someone knows the definitive answer, please post it here for everyone.
>
> Basically, when ORIENTATION is used, setting ALIGNMENT=1.0 will still anchor the text at the start, meaning the position argument passed to XYOUTS will be the start of the string. However, if a negative value is passed to ORIENTATION, the position argument will be the end of the string, which IMO is what ALIGN=1 should do. This does not appear to be documented in the XYOUTS docs or the documentation for the ORIENTATION graphic keyword.
>
> --Edward H.
  Switch to threaded view of this topic Create a new topic Submit Reply
Previous Topic: ROI to EVF and vice versa in IDL
Next Topic: Programmatically close all function graphics windows

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

Current Time: Wed Oct 08 15:06:09 PDT 2025

Total time taken to generate the page: 0.00344 seconds