Re: Connecting discontinuous plots
- To: mathgroup at smc.vnet.net
- Subject: [mg93816] Re: Connecting discontinuous plots
- From: Helen Read <hpr at together.net>
- Date: Wed, 26 Nov 2008 05:15:48 -0500 (EST)
- References: <21144462.1227518368928.JavaMail.root@m02> <gggqip$34u$1@smc.vnet.net>
- Reply-to: HPR <read at math.uvm.edu>
David Park wrote: > From: jsheinwald at comcast.net [mailto:jsheinwald at comcast.net] > > Hello, > > In the following simple step function plot is there a way to connect the > discontinuities at 1 and 2 so that the plot shows up better? > > p1=UnitStep[t-1] > p2=UnitStep[t-2] > Plot[p1-p2,{t,-1,5},PlotStyleR{Red, Thick}] > >> Use the Exclusions option. >> >> p1 = UnitStep[t - 1] >> p2 = UnitStep[t - 2] >> Plot[p1 - p2, {t, -1, 5}, >> PlotStyle -> {Red, Thick}, >> Exclusions -> None] Or, depending on what you want: p1 = UnitStep[t - 1]; p2 = UnitStep[t - 2]; Plot[p1 - p2, {t, -1, 5}, PlotStyle -> {Red, Thick}, ExclusionsStyle -> Directive[Gray, Dashed]] -- Helen Read University of Vermont