- 积分
- 10605
- 贡献
-
- 精华
- 在线时间
- 小时
- 注册时间
- 2013-10-10
- 最后登录
- 1970-1-1
|
发表于 2015-3-12 11:25:06
|
显示全部楼层
transpose用法不对。简单改了一下,没有仔细考虑,仅供参考!
pro circle2,xcenter,ycenter,radius, x, y
points=(2*!pi/99.0)*findgen(100)
x=xcenter+radius*cos(points)
y=ycenter+radius*sin(points)
;UserSym x, y, /Fill
;return,transpose([x],[y])
end
pro circle
seed = -3L
x = RandomU(-3L,30)
y = RandomU(-3L,30)
z =(3*((x-0.5)^2) + 5*((y-0.25)^2))*1000
Window, Xsize=400, Ysize=350 ,color=5
Plot, x, y, Psym=4, Position=[0.15, 0.15, 0.75, 0.95],Xtitle='X Locations', Ytitle='Y Locations'
LoadCT, 2
zcolors = Bytscl(z, Top=!D.Table_Size-1)
coords = Convert_Coord (x, y, /Data, /To_Device)
x = coords(0,*) & y = coords(1,*)
For j=0, 29 Do begin
Circle2, x(j), y(j),10, xout, yout
Polyfill, xout, yout,/Fill,Color=zcolors(j),/Device
Endfor
;Colorbar, Position = [0.85, 0.15, 0.90, 0.95],Range=[Min(z), Max(z)], /Vertical,Format='(I5)', /Right, Title='Z Values'
end
|
|