;+ ; This procedure is used to specify how many channels at the end of ; the spectrum should be ignored, when plotting. It is useful to ignore ; the bad autoscaling that can result when the edge of the spectrum contains ; bad values. ; ; Note that the values are applied in channel space, so depending on whether ; the plot is shown in channels, frequency, or velocity, an edrop value may ; affect the left or right side of the plotted spectrum ; ; @param nchan {in}{required}{type=int} number of channels to drop from the ; end of the plot ; ; @examples ; bdrop,10 ; edrop,10 ; show ; ; @version $Id: edrop.pro,v 1.3 2005/04/29 06:02:19 bgarwood Exp $ ;- pro edrop,nchan compile_opt idl2 common gbtplot_common,mystate,xarray if n_params() ne 1 then begin message,"Usage: edrop, nchans",/info return end datalen = data_valid(!g.s[0]) if datalen le 0 then begin message,'No data has been plotted yet.',/info return endif if ((nchan lt 0) or (nchan ge datalen)) then $ message, 'Bad value. Must be between 0 and ',datalen mystate.edrop = nchan if !g.frozen eq 0 then show,/reshow end