Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]


Groups > comp.soft-sys.math.mathematica > #7682

Re: more plotting peculiarities

From Chris Young <cy56@comcast.net>
Newsgroups comp.soft-sys.math.mathematica
Subject Re: more plotting peculiarities
Date 2012-01-09 08:20 +0000
Organization Steven M. Christensen and Associates, Inc and MathTensor, Inc.
Message-ID <jee813$cur$1@smc.vnet.net> (permalink)
References <jebnc5$18u$1@smc.vnet.net>

Show all headers | View raw


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}
 ]

Back to comp.soft-sys.math.mathematica | Previous | Next — Previous in thread | Next in thread | Find similar | Unroll thread


Thread

more plotting peculiarities Richard Fateman <fateman@cs.berkeley.edu> - 2012-01-08 09:24 +0000
  Re: more plotting peculiarities Chris Young <cy56@comcast.net> - 2012-01-09 08:20 +0000
  Re: more plotting peculiarities Ashwini <aksingh21@gmail.com> - 2012-01-09 08:22 +0000
  Re: more plotting peculiarities Armand Tamzarian <mike.honeychurch@gmail.com> - 2012-01-09 08:23 +0000

csiph-web