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

Home » Public Forums » archive » update vert_colors of new graphics
Show: Today's Messages :: Show Polls :: Message Navigator
E-mail to friend 
Return to the default flat view Create a new topic Submit Reply
update vert_colors of new graphics [message #94704] Wed, 30 August 2017 08:36 Go to previous message
Markus Schmassmann is currently offline  Markus Schmassmann
Messages: 129
Registered: April 2016
Senior Member
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
[Message index]
 
Read Message
Read Message
Previous Topic: comparing two variables
Next Topic: MATLAB to IDL Conversion

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

Current Time: Wed Oct 08 14:10:33 PDT 2025

Total time taken to generate the page: 0.00483 seconds