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


Groups > comp.soft-sys.math.mathematica > #7648 > unrolled thread

more plotting peculiarities

Started byRichard Fateman <fateman@cs.berkeley.edu>
First post2012-01-08 09:24 +0000
Last post2012-01-09 08:23 +0000
Articles 4 — 4 participants

Back to article view | Back to comp.soft-sys.math.mathematica


Contents

  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

#7648 — more plotting peculiarities

FromRichard Fateman <fateman@cs.berkeley.edu>
Date2012-01-08 09:24 +0000
Subjectmore plotting peculiarities
Message-ID<jebnc5$18u$1@smc.vnet.net>
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

[toc] | [next] | [standalone]


#7682

FromChris Young <cy56@comcast.net>
Date2012-01-09 08:20 +0000
Message-ID<jee813$cur$1@smc.vnet.net>
In reply to#7648
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}
 ]

[toc] | [prev] | [next] | [standalone]


#7685

FromAshwini <aksingh21@gmail.com>
Date2012-01-09 08:22 +0000
Message-ID<jee83v$d0c$1@smc.vnet.net>
In reply to#7648
On Jan 8, 9:24 am, Richard Fateman <fate...@cs.berkeley.edu> wrote:
> 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

Q:Plot[Cos[1.0 + n*2.0^-47], {n, -5, 5}]  looks empty looks empty ?

remove the axes by Axes->False and you will see the straight line .
Straight line is correct as different value of n will not make much
difference to plotted function output.

Regards,
aks

[toc] | [prev] | [next] | [standalone]


#7687

FromArmand Tamzarian <mike.honeychurch@gmail.com>
Date2012-01-09 08:23 +0000
Message-ID<jee85s$d14$1@smc.vnet.net>
In reply to#7648
On Jan 8, 8:24 pm, Richard Fateman <fate...@cs.berkeley.edu> wrote:
> 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

both are the same but the first one has weird auto plot ranging
(8.0.4)

Mike

[toc] | [prev] | [standalone]


Back to top | Article view | comp.soft-sys.math.mathematica


csiph-web