[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: xyouts with p.multi
Christopher W. O'Dell (odell@cmb.physics.wisc.edu) writes:
> I am plotting six graphs on one page using !p.multi =
> [0,2,3]
> I am trying to put some text in the same place on each
> graph, by using
>
> xyouts, x, y, 'text', /norm
>
> after each graph is plotted. I would think, using /norm,
> that it would put the
> text *in that graph*; but it doesn't, it puts it in some
> crazy place. Does anyone know how
> to make xyouts position the text with respect to the most
> recently plotted graph in the current window?
I'm not sure why you would have expected that,
since I've never heard "normalized" defined by anyone
with respect to what is *in* a window. But you could
use the "normalized" coordinates of the plot axis
endpoints to position text. Here is an example:
PRO Test
!P.Multi=[0, 3, 2]
FOR j=0,5 DO BEGIN
Plot, Findgen(11)
XYOUTS, !X.Window[0] + 0.2 * (!X.Window[1]-!X.Window[0]), $
!Y.Window[1] - 0.2 * (!Y.Window[1]-!Y.Window[0]), $
'This is text', /Normal
ENDFOR
!P.Multi=0
END
Cheers,
David
--
David Fanning, Ph.D.
Fanning Software Consulting
Phone: 970-221-0438 E-Mail: davidf@dfanning.com
Coyote's Guide to IDL Programming: http://www.dfanning.com/
Toll-Free IDL Book Orders: 1-888-461-0155