pro qSkyImage_Histogram, state, fovcube=fovcube ;+ ; NAME: ; qSkyImage_Histogram ; PURPOSE: ; Displays a histogram for the current 3D data matrix ; CATEGORY: ; Widgets: qSkyImage ; CALLING SEQUENCE: ; qSkyImage_Histogram, state ; INPUTS: ; state array[1]; type: structure ; qSkyImage state structure ; OUTPUTS: ; (qBar display) ; CALLS: ; qBar ; PROCEDURE: ; Feeds the currently selected data cube to the qBar widget ; STATE INFO USED: ; widget_control, state.wid_matrix, get_uvalue=ptrs, /no_copy ; i = widget_info(state.wid_list, /droplist_select) ; widget_control, state.wid_list, get_uvalue=list & list = list[i] ; STATE INFO MODIFIED: ; widget_control, state.wid_matrix, set_uvalue=ptrs, /no_copy ; MODIFICATION HISTORY: ; MAY-2000, Paul Hick (UCSD/CASS; pphick@ucsd.edu) ;- on_error, 2 ; On error, return to caller COMPILE_OPT hidden fovcube = keyword_set(fovcube) case fovcube of 0: begin wid_p = state.wid_matrix wid_h = state.wid_mhisto ytitle = '# Volume elements' end 1: begin wid_p = state.wid_calc wid_h = state.wid_vhisto ytitle = '# Voxels' end endcase widget_control, wid_p, get_uvalue=ptrs, /no_copy if n_elements(ptrs) ne 0 then begin i = widget_info(state.wid_list, /droplist_select) widget_control, state.wid_list, get_uvalue=list & list = list[i] space = strpos(list, ' ') title = 'CR '+strmid(list,0,space) xtitle = strmid(list,space+1) if xtitle eq 'density' then begin zmin = 0 zmax = 25 zbin = 1 endif else if xtitle eq 'velocity' then begin zmin = 300 zmax = 1200 zbin = 10 endif qbar, /histo, *ptrs[i], group=wid_h, title=title, xtitle=xtitle, ytitle=ytitle, $ zmin=zmin, zmax=zmax, zbin=zbin widget_control, wid_p, set_uvalue=ptrs, /no_copy endif return & end