http://nstx.pppl.gov/nstx/Software/IDL/idl_intro.html#GOTCHAS
IDL> set_plot,'PS'
IDL> device, filename='your_filename.ps'
IDL> ...
IDL> ... plot some stuff ...
IDL> ...
IDL> device, /close
IDL> set_plot,'X'
Why do my graphics get erased?
window,0,retain=2,xsize=500,ysize=500When a window gets covered, then uncovered, someone has to keep a copy of the obscured part of the image. You may or may not want to have all the images saved when they are obscured, by reasons of speed and memory.
In IDL, there is a keyword RETAIN, for specifying which kind of backing store to use.
- RETAIN = 0 implies no backing store,
- RETAIN = 1 IDL asks the window system to do it,
- RETAIN = 2 IDL does it
Backing store will now be maintained for this window by IDL
; File: making_waves.pro - Author: Erik Brisson
pro making_waves
a = fltarr(256,3,63)
for i=0,255 do for j=0,2 do for k=0,62 do $
a(i,j,k) = sin(float(i-k)/10.)/exp((float(i)/200.))
frames=bytarr(400,300,63)
window,retain=2,/free,title='making waves',xsize=400,ysize=300
for k=0,62 do begin $
shade_surf, a(*,*,k) & $
frames(0,0,k) = tvrd() & $
end
movie, frames, order=0
end
No comments:
Post a Comment