Re: Using XYOUTS to substitute numbers for symbols on scatter plots: a caveat [message #69591] |
Fri, 05 February 2010 10:59 |
David Fanning
Messages: 11724 Registered: August 2001
|
Senior Member |
|
|
Ed Hyer writes:
>
> 1) Obvious: use ALIGNMENT=0.5 to get the text centered on the point.
> 2) Less obvious: use a STRING(data,FORMAT='(iN.N)') and put the data
> in a fixed-width format.
>
> I wish IDL would do better, maybe it can and I am missing something. I
> simply want to substitute an integer label from 1-999 for the symbols
> in a scatter plot. Basically, what I find is that unless I specify
> FORMAT='(i3.3)' and make it plot 1 as '0001', the smaller numbers will
> be offset to the right. I would have expected that FORMAT='(i)' would
> give me what I want, but instead I get a tab-sized offset on every
> number, even with ALIGN=0.5.
Here is how I do it:
http://www.dfanning.com/graphics_tips/numlabel.html
Cheers,
David
--
David Fanning, Ph.D.
Fanning Software Consulting, Inc.
Coyote's Guide to IDL Programming: http://www.dfanning.com/
Sepore ma de ni thui. ("Perhaps thou speakest truth.")
|
|
|