Hi everybody,
I have a series of images with an overploted line with changing color.
While I know how to update the underlying image and the coordinates of
the line I have problems updating the colors.
A single image is plotted using the "new" graphics with:
help, x,y,c,conti
% X double [0,256,1501]
% Y double [0,256,1501]
% C byte [0,256,1501]
% CONTI float [100,100,1501]
cwheel=byte( colortable( reform( [ !color.red,!color.orange, $
!color.yellow,!color.green,!color.blue,!color.purple,!color. red ], $
[3,7] ),/transpose ) )
i=800
i1=image(conti[*,*,i])
p1=plot( [x[0,*,i], y[0,*,i]], overplot=i2, $
vert_colors=c[0,*,i], rgb_table=cwheel )
; and updated with
for i=0,1500 do begin
i1.putData, conti[*,*,i]
p1.putData, [x[0,*,i],y[0,*,i]]
;;; ----> UPDATE VERT_COLORS HERE<----- ;;;
endfor
; but I don't know how to update the VERT_COLORS
; a limited workaround is keeping VERT_COLORS constant
; but changing the RGB_TABLE as follows:
i=800
i2=image(conti[*,*,i])
p2=plot([x[0,*,i], y[0,*,i]],overplot=i2,vert_colors=bindgen(256), $
rgb_table=cwheel[*,c[0,*,i]])
for i=0,1500 do begin
i2.putData, conti[*,*,i]
p2.putData, [x[0,*,i],y[0,*,i]]
p2.rgb_table=cwheel[*,c[0,0:255,i]]
endfor
; but this works only if for every time step there are at most 256
; values to plot
does anybody know how to properly update VERT_COLORS ?
Any help would be appreciated, thanks, Markus
|