Thanks for your prompt and detailed reply... I just checked out your
extensive website, and your fsc_surface routine is very close to what
I'm looking for... However, I'm not sure if I can use it with repeated
calls.
Do you (or anyone else on here) know if it is possible (within the GUI)
to surf something in a separate object window with fsc_surface (or
XPlot3D), then when I push another button on the GUI, have the first
object window close, and open a new one for the second plot (or just
overwrite the old with the new)?
Also, is it possible to simply have this object window display in the
GUI by replacing the base with a specified base?
Thanks...
-Steve
P.S. The following is along the lines of how I am attempting the
plot...
pro ant_test_event, event
widget_name=widget_info(event.id, /uname)
;print, widget_name
case widget_name of
'pushit': begin
;print, 'in fslider1_roll'
widget_control, event.top, get_uvalue=global_data
;ang=[0:.1:2.*pi+.1]';
ang=transpose(2*!PI*findgen(14)/13)
n=size(ang, /N_ELEMENTS )
ones=fltarr(n,1)+1
theta_a=(ang##ones)
;ang2=[0:.05:pi+.05]'-pi/2;
ang2=transpose(!PI*findgen(n)/(n-1)-!PI/2)
theta_e=transpose(ang2##ones)
r_o=fltarr(n,n)+1
rcart=1+cos(!pi/2-theta_e)
;rcart=r_o
theta_a_1d=reform(theta_a,1,n*n)
theta_e_1d=reform(theta_e,1,n*n)
rcart_1d=reform(rcart,1,n*n)
sph=[theta_a_1d,theta_e_1d,rcart_1d]
rectc=cv_coord(from_sphere=sph, /to_rect)
x_1d=rectc(0,*)
y_1d=rectc(1,*)
z_1d=rectc(2,*)
x=reform(x_1d,n,n)
y=reform(y_1d,n,n)
z=reform(z_1d,n,n)
fid=global_data.window1_id
wset, fid
surface, z,x,y;, AX=45, AZ=45
;shade_surf, z;,x,y;AX=-30, AZ=-45
;xplot_sl, x,y,z
;fsc_surface, z,x,y
end
'Quit': begin
print,'Got into Quit Case'
widget_control, event.top, /destroy
end
else:
endcase
end
;----------------------------------------------------------- --------------------------------------
pro ant_test
fund_base=widget_base(column=2, title="Plotting test GUI")
N=256
draw1=widget_draw(fund_base, xsize=N, ysize=N, uname="window1")
pushit=widget_button(fund_base, value="Push to Plot",
uname="pushit")
quit_button=widget_button(fund_base, value="Quit", uname="Quit")
widget_control, fund_base, /realize
widget_control, draw1, get_value=window1
global_data={draw1_id: draw1, window1_id: window1 }
widget_control, fund_base, set_uvalue=global_data
xmanager, 'ant_test', fund_base
event_handler='ant_test_event'
end
|