proc plotType {idx pt {gw {}}} {
#$Header: /home/cvsroot/tcldb/wisql/Tlib/plotType,v 1.2 1998/05/18 22:29:15 de Exp $
	global Chart blt_version

	
	if {$gw == ""} {

	set win [keylget Chart($idx) win]
	set pc [keylget Chart($idx) plots]
	set ppt [keylget Chart($idx) ptyp]
	if {$pt == $ppt} {return}

	} else {

	set pc 1	

	}	

#	puts stderr "Plot Type is $pt"

#	legit types are PTS, LIN, SPL, STP

	set pw $gw

	loop i 0 $pc {
		if {$gw == ""} {
		set pw $win.f0.c.f1.g$i
		} 
		foreach e [$pw element names] {
		switch $pt {
		PTS {
		$pw element configure $e -linewidth 0 -pixels 2 -symbol splus
		}
		LIN {
		if {$blt_version >= 2.3} {
		$pw element configure $e -linewidth 1 -symbol none -smooth linear
		} else {
		$pw element configure $e -linewidth 1 -symbol none 
		}
		}
		SPL {
		if {$blt_version >= 2.3} {
		$pw element configure $e -linewidth 1 -symbol none -smooth natural
		} else {
		puts stderr "Sorry, old version of blt $blt_version, can't spline"
		return
		}
		}
		STP {
		if {$blt_version >= 2.3} {
		$pw element configure $e -linewidth 1 -symbol none -smooth step
		} else {
		puts stderr "Sorry, old version of blt $blt_version, can't step"
		return
		}
		}
		}
		}
	}

	if {$gw == ""} {
	keylset Chart($idx) ptyp $pt
	}

}

