XYOUTS and ORIENTATION keyword: use negative values to anchor on end of string [message #93573] |
Wed, 24 August 2016 11:31  |
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  |
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.
|
|
|