MathGroup Archive 1999

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

Search the Archive

Re: Graphic simple?

  • To: mathgroup at
  • Subject: [mg18291] Re: Graphic simple?
  • From: paulh at (P.J. Hinton)
  • Date: Fri, 25 Jun 1999 15:05:32 -0400
  • Organization: Wolfram Research, Inc.
  • References: <7ktv1m$>
  • Sender: owner-wri-mathgroup at

In article <7ktv1m$97k at>, "Jesus Perez Ortega" <jesper at> writes:

> I don't know why the mathematica don't plot well this sinple graphic
> Plot[t-(t-1) UnitStep[t-1],{t,0,5}]

It would be helpful if you would provide in your description what
you mean by "don't plot well". 

I am going to guess that you are referring to the fact that the range
of the vertical axis runs from 0.86 to 1.01.  This can be fixed by
using the option PlotRange as follows:

Plot[t - (t - 1) UnitStep[t - 1], {t, 0, 5}, PlotRange -> All]

The algorithms that the kernel uses to select a vertical plot
range work for most cases, but functions with jumps like this 
sometimes give strange results.

P.J. Hinton	
Mathematica Programming Group		paulh at
Wolfram Research, Inc.
Disclaimer: Opinions expressed herein are those of the author alone.

  • Prev by Date: Re: O.D.E in Power Series
  • Next by Date: Re: plot
  • Previous by thread: Re: Graphic simple?
  • Next by thread: Re: Graphic simple?