On Mar 9, 3:25 pm, David Fanning <n...@idlcoyote.com> wrote:
> Sofie Fehlmann writes:
>> I'm a very beginner and would like to create a movie with IDL. I tried
>> therefore the following:
>
>> for i=0,n-1 do begin
>> filename ='DATA_000' +strtrim(i,2)+'.tab'
>
>> readdata,filename
>
>> iimage = tvrd(true=3)
>> xinteranimate,image=iimage,frame=i
>> endfor
>
>> Readdata is a program which creates (after some calculations) a
>> contour plot. However, when xinteranimate starts, the contour plot
>> appears correctly but not in the xinteranimate frame. Therefore, I get
>> a black screen movie. So, I think something is completely wrong...
>> The same problem happens if I use the 'addvideostream' command. The
>> contour plot seems to appear in a different window.
>> How can I "put" the contour plot which I call with Readdata into a
>> movie frame?
>
> But, you are taking a snapshot of the ReadData window and
> putting that into the animation. Is that what you say is
> not working? Are you sure you are taking the snapshot of the
> right window? Is there anything except black pixels in your
> image? How does ReadData deal with windows?
>
> Cheers,
>
> David
>
> --
> David Fanning, Ph.D.
> Fanning Software Consulting, Inc.
> Coyote's Guide to IDL Programming:http://www.idlcoyote.com/
> Sepore ma de ni thui. ("Perhaps thou speakest truth.")
Yes, I would like to take a snapshot of the Contour plot and put it
into a movie. However, it is not working, there is just a black
screen. This is the main part of my 'Readdata':
c1=contour(data,x,y,rgb_table=33,/fill,c_value=userlevels,$
Position=[0.1, 0.15, 0.9, 0.90],c_color=indgen(levels),$
title=['Density at t ='+string(time)],,/overplot)
Except of the overplot command, there is no specification how to
handle the window.
If I use the following command, I can see the title of my plot in a
movie, but no contour plot:
loadct, 1
set_plot,'z',/copy
device, set_resolution=framedims, set_pixel_depth=24, decomposed=0
for i=0,nframes-1 do begin
filename ='DATA_000' +strtrim(i,2)+'.tab'
readdata,filename
xyouts, 0.5, 0.9, 'IDL TITLE', align=0.5, charsize=2, /normal
timestamp = video.put(stream, tvrd(true=1))
endfor
|