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

Home » Public Forums » archive » Re: plot: Messed-up coordinates when switching devices
Show: Today's Messages :: Show Polls :: Message Navigator
E-mail to friend 
Return to the default flat view Create a new topic Submit Reply
Re: plot: Messed-up coordinates when switching devices [message #50270] Wed, 20 September 2006 08:08 Go to previous message
Paolo Grigis is currently offline  Paolo Grigis
Messages: 171
Registered: December 2003
Senior Member
It seems that set_plot,'PS' generates a new blank file, so even
if you give the oplot command with the right positional keyword,
the original plot is still going do disappear. I guess that
if you are going to overplot anything in a PS file, you should
not use device,/close before.

Ciao,
Paolo

Ingo von Borstel wrote:
> 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
>
[Message index]
 
Read Message
Read Message
Previous Topic: plot: Messed-up coordinates when switching devices
Next Topic: Re: Redraw an image in IDL object

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

Current Time: Sat Oct 11 16:11:06 PDT 2025

Total time taken to generate the page: 1.68307 seconds