MathGroup Archive 1999

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

Search the Archive

Re: plot bug

  • To: mathgroup at smc.vnet.net
  • Subject: [mg16734] Re: [mg16656] plot bug
  • From: "Wolf, Hartmut" <hwolf at debis.com>
  • Date: Wed, 24 Mar 1999 02:23:49 -0500
  • Organization: debis Systemhaus
  • References: <199903191754.MAA09828@smc.vnet.net.>
  • Sender: owner-wri-mathgroup at wolfram.com

Dear Arnold

Arnold Knopfmacher schrieb:
> 
> Using Mathematica 3.0 on a Mac and on a PC, the following command
> 
> Plot[Cos[Degree Tan[Degree Sin[x]]],{x,0,2 Pi}]
> 
> produced a graph whose y axis labels were ALL 1.
> Any explanation?
> 

If you just plot that, it comes as a surprise. However, if observe what
you are doing, e.g. with

In[2]:=
showMe[aStart_, aEnd_, n_Integer/;n>1, plotOptions___]:= 
  Module[{ aStep=(aEnd-aStart)/(n-1), i},
Do[g[i]=With[{a= aStart+aStep(i-1)},
          Plot[Cos[a Tan[a Sin[x]]],{x,0,2 Pi},PlotLabel->a,
            DisplayFunction->Identity, plotOptions]],{i,n} ];
Show[GraphicsArray[Table[Array[g,3, i],{i,1,n,3}]], 
      DisplayFunction->$DisplayFunction]  ]

then there is now surprise!

Please checkout

In[3]:= showMe[1., 0.5, 24, PlotRange->{{0,2 Pi},{0,1}}]

and then

In[4]:= showMe[1., Degree, 24, AxesOrigin->{0,1}]

you will see something!

There is nothing mysterious with Degree, it only happens to be quite
small! 

In[5]:= {Cos[0], Cos[Degree]}//N
Out[5]= {1.,0.999848}

Furthermore you might like to see what happens with:

In[6]:= showMe[1.0, Pi/2, 24, PlotPoints->1000]

Then Tan[Pi/2] becomes quite large, and the Cos of that becomes quite
rapidely oscillating. 

I think the question is, what did you _mean_ with a = Degree exactly?

your's Hartmut


  • References:
    • plot bug
      • From: "Arnold Knopfmacher" <arnoldk@gauss.cam.wits.ac.za>
  • Prev by Date: subgraph ismorphism (and MCS) in mathematica
  • Next by Date: Re: DSolve Error Message
  • Previous by thread: plot bug
  • Next by thread: Re: plot bug