*! tsplot AT 1.1.0, 6 January 1999
* tsplot AT 1.0.0, 13 November 1998

program define tsplot
	version 5.0
	local varlist "req ex min(1)"
	local if "opt"
	local in "opt"
        local weight "fweight pweight"
        local options "`options' b2(str) matrix half *"
        parse "`*'"
        parse "`varlist'", parse (" ")

	tempvar t
	qui gen `t'=_n
	label var `t' "Time scale"

        if "`b2'" == "" { local b2 "b2(Time scale)" }
        else local b2 "b2(`b2')"

	if "`matrix'" == "" | "`half'" == "" {
		gr `varlist' `t' [`weight'`exp'] `if' `in', `options' `b2' `matrix' `half'
	}
	else {
		gr `t' `varlist' [`weight'`exp'] `if' `in', `options' `b2' `matrix' `half'
	}

end