To increase the performance of the SYMBOL function, create arrays with all of the symbol locations and then plot them all at the same time. I think you would want to modify you code to be something like the following (NOTE: I haven't tested this code, but this is an example of how it might be done):
;plot fires-- waaay slow
fire_comp=alog10(fire_comp+1.) /2.0
ofire_comp=alog10(ofire_comp+1.) /2.0
sym_x = list()
sym_y = list()
o_sym_x = list()
o_sym_y = list()
asize=size(fire_comp)
for i=0,asize[1]-1 do begin
for j=0,asize[2]-1 do begin
if fire_comp[i,j] gt 0.0 and finite(fire_comp[i,j]) then begin
sym_x.add, rcm_x_2d[i,j]
sym_y.add, rcm_y_2d[i,j]
endif
if ofire_comp[i,j] gt 0.0 and finite(ofire_comp[i,j]) then begin
o_sym_x.add, rcm_x_2d[i,j]
o_sym_x
endif
endfor
endfor
fsym = symbol(rcm_x_2d[i,j], rcm_y_2d[i,j], /data, symbol="triangle",sym_color='red',target=img1)
ofsym = symbol(rcm_x_2d[i,j], rcm_y_2d[i,j], /data, symbol="triangle", sym_color='blue', target=img1)
Unfortunately, you won't be able to specify the size of each symbol the way you did in your code. An alternative approach is to use Bubbleplot (but you can't change the symbol) or SCATTERPLOT (you can adjust the color for each symbol but not the size).
|