Dear ALL
David Fanning wrote:
> Damiano Zilio (damiano.zilio@jrc.it) writes:
>
>> I produce gif files with these 2 different ways:
>>
>> 1)
>> set_plot,'x'
>> window,0,reatin=2,xsixe=700,ysize=500
>> plot.....
>> img=tv()
>> write_gif,'filename',img
>>
>> 2)
>> set_plot,'z'
>> device,set_resolution=[700,500]
>> plot
>> img=tv()
>> write_gif,'filename',img
>>
>> But the gif files obtained are different!!!
>> The relative position of the colorbar, using the z-buffer are wrong!,
>> there are some
>> strange overplottings!!
>> Can I avoid this problem?
>
> You must configure the Z-graphics buffer to be exactly like
> your window. This means you need to make the resolution
> and number of colors the same. (The Z-buffer has 256 colors
> by default, which can be a very nice feature when making
> GIF files. In fact, is one reason why I almost always use
> the Z-buffer to make GIF files.) To make the Z-buffer
> exactly like your current graphics window, try this:
>
> ncolors = !D.N_Colors - 1
> Set_Plot, 'Z'
> Device, Set_Resolution=[!D.X_Size, !D.Y_Size], $
> Set_Colors=ncolors
>
> Cheers,
>
> David
am I creazy or... the plots produced on the momitor by this stupid program
are different????
Why????
>>>> >>>>>>>>>>>
pro test1
loadct,16
set_plot,'x'
plot,findgen(5),/nodata,position=[0,0,1,1]
img=tvrd()
write_gif,'x.gif',img
set_plot,'z'
ncolors=!D.N_Colors-1
device,set_Resolution=[!D.X_Size,!D.Y_Size],set_colors=ncolo rs
plot,findgen(5),/nodata,position=[0,0,1,1]
img=tvrd()
write_gif,'z.gif',img
device,/close
set_plot,'x'
read_gif,'x.gif',imgx
read_gif,'z.gif',imgz
window,1,retain=2,title='xgif'
tv,imgx
window,2,retain=2,title='zgif'
tv,imgz
end
>>>> >>>>>>>>>>>>>.
On my monitor the position af the axis in the tv of the image
plotted in the z-buffer is different from the same axes plotter in the x
device
WHY?
WHY?
WHY?
--
Damiano Zilio
Joint Research Centre of the Commission of
the European Communities
I-21020 Ispra (VA)
|