Re: oplot in normal coordinates? [message #16236 is a reply to message #16232] |
Tue, 13 July 1999 00:00  |
davidf
Messages: 2866 Registered: September 1996
|
Senior Member |
|
|
Martin LUETHI GL A8.1 2-4092 (luthi@aura.ethz.ch) writes:
> Just another problem with plotting: is it possible to oplot in normal
> coordinates?
No.
> plot, [0],[0],xrange=[-1,1],yrange=[-1,1]
> oplot,[0.5],[0.5],psym=2,/normal
>
> plots the symbol at (0.5,0.5) in data coordinates instead of somewhere around
> (0,0), which would be the appropriate place in normal coordinates. Am I
> overlooking something?
In IDL, at least, the OPLOT command doesn't allow the use
of the NORMAL keyword. But even if it did, it would probably
just ignore it in exactly the same way the PLOT command
ignores it. In other words, these three commands produce
identical results.
PLOT, Findgen(11), /Data
PLOT, Findgen(11), /Normal
PLOT, Findgen(11), /Device
But what else would you expect? A plot is a plot.
It sets up scaling factors that tell you how to
display something in the display window. It is
these scaling factors (e.g., !X.S) that OPLOT pays
attention to.
If you really want to put a plot symbol in the middle
of the display, I would use the PLOTS command:
PlotS, 0.5, 0.5, PSym=2, /Normal
PLOTS ignores PLOT system variables and does exactly
what you tell it to, in whatever coordinate system you
choose to use.
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
|
|
|