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

Home » Public Forums » archive » plot: Messed-up coordinates when switching devices
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
plot: Messed-up coordinates when switching devices [message #50272] Wed, 20 September 2006 07:30
Ingo von Borstel is currently offline  Ingo von Borstel
Messages: 54
Registered: September 2006
Member
Hi there,

I have a few plotting routines that shall allow plotting to the screen
and, if a filename is supplied, concurrently into that file.
In order to allow the usage of oplot I just switched devices as follows:

PRO plotit, x,y, filename=filename, continueplot=continueplot

IF NOT KEYWORD_SET(continueplot) THEN BEGIN
PLOT, x,y
IF KEYWORD_SET(filename) THEN BEGIN
SET_PLOT('PS')
DEVICE, file=filename, /ENCAPSULE, COLOR=8
PLOT, x,y, /DEVICE
DEVICE, /CLOSE
SET_PLOT('X')
ENDIF
ENDIF ELSE BEGIN
OPLOT, x,y
IF KEYWORD_SET(filename) THEN BEGIN
SET_PLOT('PS')
DEVICE, file=filename, /ENCAPSULE, COLOR=8
OLOT, x,y, /DEVICE
DEVICE, /CLOSE
SET_PLOT('X')
ENDIF
ENDELSE

END

Now, calling first w/o continueplot and subsequently the routine with
continueplot, the plots are not aligne anymore wrt to x-axis, the whole
dataset is shifted and streched.

I assume it has to do with the coordinate systems of the screen and the
file that get mixed up. But I didn't find a solution to fix it. :( Any
suggestions how to make this work or circumvent it are welcome.

Best regards,
Ingo

--
Ingo von Borstel <newsgroups@planetmaker.de>
Public Key: http://www.planetmaker.de/ingo.asc

If you need an urgent reply, replace newsgroups by vgap.
  Switch to threaded view of this topic Create a new topic Submit Reply
Previous Topic: Maddening structures
Next Topic: Re: plot: Messed-up coordinates when switching devices

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

Current Time: Wed Oct 08 15:26:56 PDT 2025

Total time taken to generate the page: 0.00537 seconds