MathGroup Archive 2012

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

Search the Archive

Re: more plotting peculiarities

  • To: mathgroup at smc.vnet.net
  • Subject: [mg124105] Re: more plotting peculiarities
  • From: Chris Young <cy56 at comcast.net>
  • Date: Mon, 9 Jan 2012 03:17:09 -0500 (EST)
  • Delivered-to: l-mathgroup@mail-archive0.wolfram.com
  • References: <jebnc5$18u$1@smc.vnet.net>

On 2012-01-08 09:24:21 +0000, Richard Fateman said:

> Plot[Cos[1.0 + n*2.0^-47], {n, -5, 5}]  looks empty
>
> Plot[Cos[1.02 + n*2.0^-47], {n, -5, 5}]
>    looks like a straight line with slope about -1
>
> version 7

This is due to what I think are some deceptive plotting defaults in
Mathematica. Where the axes cross is not necessarily the origin; not in this
case, at any rate. I think it would be a lot clearer if the x-axis in
this case were either plotted in dashed form or grayed out a little bit
more, to show its not at its expected position, y = 0.

If you specify that the axes must cross at the origin, you'll see that
in both cases the slope was tiny, nowhere near what it looked like:

Plot[Cos[1. + n/2.^47], {n, -5, 5},
 PlotStyle -> {Red, Thick},
 AxesStyle -> Lighter[Blue, 0.7],
 AxesOrigin -> {0, 0}
 ]


Plot[
 Cos[1.02 + n/2.^47], {n, -5, 5},

 PlotStyle -> {Red, Thick},
 AxesStyle -> Lighter[Blue, 0.7],
 AxesOrigin -> {0, 0}
 ]




  • Prev by Date: Re: Re: find data
  • Next by Date: Re: MatrixPower problem
  • Previous by thread: Re: more plotting peculiarities
  • Next by thread: For a variety of plotting experiences, maybe bugs? (small intervals)