MathGroup Archive 2007

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

Search the Archive

Re: RE: piecewise plot


On Jul 12, 2007, at 4:24 AM , Robert Pigeon wrote:

> About this for a start....
>
> c[t_] := \[Piecewise] {
>    {0, t >= 0 && t < 10},
>    {1, t >= 10 && t < 20},
>    {0, t >= 20 && t < 30},
>    {-0.5, t >= 30 && t < 40},
>    {0, t >= 40 && t < 50},
>    {2, t >= 50 && t < 60}
>   }
>
> Plot[c[t],{t,0,60},Filling->Axes,FillingStyle->Orange]
>

I think you meant to use Filling->Axes to fill the whole area between  
the curve and the axis.

ExclusionsStyle can be used to draw lines between disconnected  
sections of the curve.

Brett Champion
Wolfram Research



  • Prev by Date: Export
  • Next by Date: anyone tried the debugger?
  • Previous by thread: RE: piecewise plot
  • Next by thread: Re: piecewise plot