pro screenplot common PLOT_BLOCK, filename,filename1,cnt,cont window,0,xsize=600,ysize=600,title='SCF Maps' window,1,title='Histograms',xsize=450,ysize=300 window,2,xsize=150,ysize=400,title='Color Bar' top1=widget_base(/column,title='Variable Choice',xoffset=200,$ yoffset=350) message1=widget_text(top1,value='Plot a variable on the screen.') row1=widget_base(top1,/row) TAb=widget_button(row1,value='Antenna Temperature',uvalue=18) vlsrb=widget_button(row1,value='Velocity Centroid',uvalue=20) vdispb=widget_button(row1,value='Est. Line Width',uvalue=19) noiseb=widget_button(row1,value='Noise',uvalue=22) s2nb=widget_button(row1,value='Signal to Noise',uvalue=23) row2=widget_base(top1,/row) sij=widget_button(row2,value='S_ij',uvalue=10) slij=widget_button(row2,value='S^l_ij',uvalue=13) ssij=widget_button(row2,value='S^s_ij',uvalue=15) s0ij=widget_button(row2,value='S^0_ij',uvalue=17) cnt=widget_button(top1,value='Non-linear contours (press to change)',$ uvalue=33) choose=widget_button(top1,value='Choose a new color table...',$ uvalue=31) roi=widget_button(top1,value='Examine a Region of Interest...',$ uvalue=32) message2=widget_text(top1,value='Export a map to a PostScript file.') row3=widget_base(top1,/row) TAbp=widget_button(row3,value='Antenna Temperature',uvalue=48) vlsrbp=widget_button(row3,value='Velocity Centroid',uvalue=50) vdispbp=widget_button(row3,value='Est. Line Width',uvalue=49) noisebp=widget_button(row3,value='Noise',uvalue=52) s2nbp=widget_button(row3,value='Signal to Noise',uvalue=53) row4=widget_base(top1,/row) sijp=widget_button(row4,value='S_ij',uvalue=40) slijp=widget_button(row4,value='S^l_ij',uvalue=43) ssijp=widget_button(row4,value='S^s_ij',uvalue=45) s0ijp=widget_button(row4,value='S^0_ij',uvalue=47) filename=cw_field(top1,title='Map File Name:',value='map.ps') message3=widget_text(top1,$ value='Export a histogram to a PostScript file.') row5=widget_base(top1,/row) TAbp=widget_button(row5,value='Antenna Temperature',uvalue=68) vlsrbp=widget_button(row5,value='Velocity Centroid',uvalue=70) vdispbp=widget_button(row5,value='Est. Line Width',uvalue=69) noisebp=widget_button(row5,value='Noise',uvalue=72) s2nbp=widget_button(row5,value='Signal to Noise',uvalue=73) row6=widget_base(top1,/row) sijp=widget_button(row6,value='S_ij',uvalue=60) slijp=widget_button(row6,value='S^l_ij',uvalue=63) ssijp=widget_button(row6,value='S^s_ij',uvalue=65) s0ijp=widget_button(row6,value='S^0_ij',uvalue=67) filename1=cw_field(top1,title='Histogram File Name:',$ value='histogram.ps') finis=widget_button(top1,value='Done.',uvalue=30) widget_control,/realize,top1 xmanager, 'screenplot', top1 end ;----------------------------- pro screenplot_event,event @varld.cb common PLOT_BLOCK common GUI_BLOCK widget_control, event.id, get_uvalue=buttonpress if (buttonpress eq 30) then begin wdelete,0 wdelete,2 wdelete,1 cont=0 widget_control,event.top,/destroy endif if (buttonpress eq 31) then xloadct if (buttonpress eq 32) then begin wdelete,1 wdelete,2 exroi endif if (buttonpress eq 33) then begin widget_control,cnt,get_value=nm if strpos(nm(0),'-') eq -1 then begin cont=0 widget_control,cnt,set_value=$ 'Non-linear contours (press to change)' endif else begin cont=1 widget_control,cnt,set_value=$ 'Linear contours (press to change)' endelse endif if (buttonpress lt 30) then begin plot=buttonpress-10 if (total(outdata(*,*,plot) ne 99999.0) eq 0) then begin wset,1 erase wset,2 erase wset,0 erase xyouts,0.2,0.5,'No Valid Data to Plot',/normal,charsize=3. goto,skipout endif selscrplot,outdata,plot,lvlflag=cont selscrhist,outdata,plot skipout: endif if (buttonpress gt 39) and (buttonpress lt 60) then begin plot=buttonpress-40 widget_control,filename,get_value=filenom if (filenom(0) eq '') then begin oops=widget_message('Please enter a filename.') goto,skipout1 endif if (total(outdata(*,*,plot) ne 99999.0) eq 0) then begin haha2=widget_message('No Valid Data in Plot') goto,skipout1 endif selplot,filenom(0),outdata,plot,lvlflag=cont done=widget_message($ 'File exported to the postscript file '+filenom(0),$ /information) skipout1: endif if (buttonpress ge 60) then begin plot=buttonpress-60 widget_control,filename1,get_value=filenom1 if (filenom1(0) eq '') then begin oops=widget_message('Please enter a filename.') goto,skipout2 endif if (total(outdata(*,*,plot) ne 99999.0) eq 0) then begin haha1=widget_message('No Valid Data in Plot') goto,skipout2 endif selhist,outdata,filenom1(0),plot,1 done1=widget_message($ 'File exported to the postscript file '+filenom1(0),$ /information) skipout2: endif end