MathGroup Archive 2008

[Date Index] [Thread Index] [Author Index]

Search the Archive

Re: Connecting discontinuous plots


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


  • Prev by Date: Re: Export movie from MathKernel along
  • Next by Date: Re: v.7.0 issues
  • Previous by thread: Re: Connecting discontinuous plots
  • Next by thread: A query regarding polytope's faces and vertices