;+
; NAME:
;	SMEI_SEQUENCE::SET_DATA_RANGE
;
;
; PURPOSE:
;	To set the data range to show in plots.
;
;
; CATEGORY:
;	SMEI_SEQUENCE
;
;
; CALLING SEQUENCE:
;	seqref -> set_data_range, min, max
;		or
;	seqref -> set_data_range, range
;
;
; INPUTS:
;	min	float	The lower bound to set
;	max	float	The upper bound to set
;	range	float	2-element array containing the above.
;
; KEYWORD PARAMETERS:
;	logarithmic	int	Whether to use logarithmic scaling or not.
;	kill		float	Set a range of values outside which
;				data are considered bad (2-element
;				array or a scalar == [-kill, kill])
;
;
; MODIFICATION HISTORY:
;	Original: 10/12/02; SJT
;	Renamed: 12/12/02; SJT
;	Add logarithmic option: 10/1/03; SJT
;	Add KILL keyword: 229/3/04; SJT
;-

pro smei_sequence::set_data_range, min, max, logarithmic = $
  logarithmic, kill = kill

if n_params() eq 1 then self.options.data_range = min $
else if n_params() eq 2 then self.options.data_range = [min, max]

if n_elements(logarithmic) ne 0 then self.options.data_log = $
  keyword_set(logarithmic)

if keyword_set(kill) then begin
    if n_elements(kill) eq 2 then self.options.data_kill = kill $
    else self.options.data_kill = [-kill, kill]
endif

self -> mk_pixmap, /clear

end
