MathGroup Archive 2010

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

Search the Archive

Re: Plotting anomaly with a staircase function

  • To: mathgroup at
  • Subject: [mg114788] Re: Plotting anomaly with a staircase function
  • From: Andy <andyr at>
  • Date: Fri, 17 Dec 2010 03:28:27 -0500 (EST)
  • References: <ieado1$rbs$> <>

On 12/16/2010 4:49 AM, Nasser M. Abbasi wrote:
> On 12/15/2010 4:53 AM, rebcabin wrote:
>> Hello -- I was investigating a staircase function derived from a
>> representation of a parametric polyline (concept from Differential
>> Geometry), and found some plotting anomalies. In particular, sometimes
>> the "risers" of the stair steps are slanted instead of the expected
>> vertical. I did some fuzz testing of my function and was unable to
>> find an anomaly numerically amongst a million random inputs. I
>> compared my staircase against a different form built from the Matheamtica
>> built-in UnitStep, and that second form does NOT show the anomaly. I
>> boiled everything down to the smallest possible notebook I could, and
>> would be grateful for advice from the community, if anyone has a
>> moment to look at it. There should be nothing difficult or subtle,
>> here, which makes it all the more puzzling!
>> Notebook posted below.
> I ran your notebook in V 8, and I do not see the anomaly, here is a screen shot:
> --Nasser
The anomaly likely arises from a lack of PlotPoints. Plot is typically 
not very good with vertical risers in step functions if the sampling 
points are set to default. Try boosting the number of sample points by 
giving PlotPoints -> 500 or something. This is overkill but will likely 
solve your problem.


  • Prev by Date: Re: how to debug existing notebook in workbench?
  • Next by Date: Re: Defining a distribution
  • Previous by thread: Re: Plotting anomaly with a staircase function
  • Next by thread: manipulate time