Mathematica 9 is now available
Services & Resources / Wolfram Forums
-----
 /
MathGroup Archive
2004
*January
*February
*March
*April
*May
*June
*July
*August
*September
*October
*November
*December
*Archive Index
*Ask about this page
*Print this page
*Give us feedback
*Sign up for the Wolfram Insider

MathGroup Archive 2004

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

Search the Archive

Plot Feature Concerning Number of Points Generated With Zero Function

  • To: mathgroup at smc.vnet.net
  • Subject: [mg48450] Plot Feature Concerning Number of Points Generated With Zero Function
  • From: "David Park" <djmp at earthlink.net>
  • Date: Sun, 30 May 2004 06:12:11 -0400 (EDT)
  • Sender: owner-wri-mathgroup at wolfram.com

Dear MathGroup,

Consider plotting a constant...

Plot[1, {x, 0, 5}] // First;
% /. Line[pts_] :> Length[pts]
{{25}}

We obtain 25 points for almost any value of the constant.

Except if we use zero for the constant.

plotzero = Plot[0, {x, 0, 5}] // First;
% /. Line[pts_] :> Length[pts]
{{901}}

901 points certainly seems excessive. Furthermore it can be a problem if transformations are done on the points. For example,

Show[Graphics[plotzero /. {x_?NumberQ, y_?NumberQ} -> {x, y - x}]];

produces a thick somewhat jagged line (depending on the AspectRatio) because of the excessive number of points.

This can be overcome by using the PlotPoints option, but it still singles out the zero function as a special case.

David Park
djmp at earthlink.net
http://home.earthlink.net/~djmp/ 



  • Prev by Date: Re: Re: how can I solve a function Erfc
  • Next by Date: Re: how can I solve a function Erfc
  • Previous by thread: Re: PlotRange
  • Next by thread: Eigensystem[] bug in Mathematica 5.0 (fixed in 5.0.1)