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

Home » Public Forums » archive » oplot
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: oplot [message #69744 is a reply to message #69629] Mon, 08 February 2010 21:37 Go to previous messageGo to previous message
Gray is currently offline  Gray
Messages: 253
Registered: February 2010
Senior Member
On Jan 28, 6:22 pm, Paul van Delst <paul.vande...@noaa.gov> wrote:
> bing999 wrote:
>> It does not work... It still oplots everything on the last plot...
>> I must keep only the "x1save = !x y1save = !y " after the "plot" and
>> the "!x = x1save  !y = y1save" before the "oplot", thats it?
>
>> Are the " ; Master save
>>  xsave = !x
>>  ysave = !y"
>> and " ; Master restore
>>  !x = xsave
>>  !y = ysave "
>
>> lines respectively at the beginning and the end of the script are
>> useful? Should I add them?
>
> No. You can't do what you originally asked for when the output is PS. In the context of
> IDL, there is no way to overplot on a previous page in a PS file. With direct graphics
> it's obviously easy (via WSET), but there is no PS equivalent (that I'm aware of).
>
> It might be possible to do what you want in PostScript itself (via some arcane PS command).
>
> The easiest solution would be to restructure your code to output each plot to a different
> PS file.
>
> cheers,
>
> paulv
>
>> Thank you for your help!
>
>>> Hi, thanks for your answers. I should have mentionned that i want to
>>> save the plots as .ps then i use :
>
>>>   set_plot, 'ps'
>>>   device, filename='myplots.ps',/color,bits_per_pixel=8
>>> ..............................
>>>   device, /close
>
>>> and what you proposed seems not to work with such environment.
>>> Is it possible to arrange that?
>>> Thanks!
>
>>>> mgalloy wrote:
>>>> > I think you want something like:
>>>> > if (i eq 0) then begin
>>>> >   window, /free
>>>> >   win1 = !d.window
>>>> >   plot, x1, y1
>>>> >   window, /free
>>>> >   win2 = !d.window
>>>> >   plot, w1, z1
>>>> >   ...
>>>> > endif else begin
>>>> >   wset, win1
>>>> >   oplot, x2, y2
>>>> >   wset, win2
>>>> >   plot, w2, z2
>>>> >  ...
>>>> > endelse
>>>> And you might want to save the !X and !Y sysvars after each PLOT and then restore then
>>>> before each OPLOT for each of the two plots, e.g.
>>>>  ; Master save
>>>>  xsave = !x
>>>>  ysave = !y
>>>>  if (i eq 0) then begin
>>>>    window, /free
>>>>    win1 = !d.window
>>>>    plot, x1, y1
>>>>    x1save = !x
>>>>    y1save = !y
>>>>    window, /free
>>>>    win2 = !d.window
>>>>    plot, w1, z1
>>>>    x2save = !x
>>>>    y2save = !y
>>>>    ...
>>>>  endif else begin
>>>>    wset, win1
>>>>    !x = x1save
>>>>    !y = y1save
>>>>    oplot, x2, y2
>>>>    wset, win2
>>>>    !x = x2save
>>>>    !y = y2save
>>>>    oplot, w2, z2
>>>>   ...
>>>>  endelse
>>>>  ; Master restore
>>>>  !x = xsave
>>>>  !y = ysave
>>>> Probably overkill, but still...
>>>> cheers,
>>>> paulv
>

Can you use multiple windows in the z-buffer? If so, you could make
all your plots using the win and wset, then read the images and dump
them to a postscript. You would probably have resolution issues,
though, even if it worked.
[Message index]
 
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Previous Topic: Re: BSQ to BIL
Next Topic: Re: Extract / interpolate in 3d atmospheric field

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

Current Time: Fri Oct 10 04:59:55 PDT 2025

Total time taken to generate the page: 0.15543 seconds