MathGroup Archive 2009

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

Search the Archive

Re: Advanced plotting

  • To: mathgroup at smc.vnet.net
  • Subject: [mg99030] Re: Advanced plotting
  • From: Bill Rowe <readnews at sbcglobal.net>
  • Date: Fri, 24 Apr 2009 03:48:37 -0400 (EDT)

On 4/23/09 at 6:44 AM, zhengji.li at gmail.com (Li Zhengji) wrote:

>Oh, not exactly.

>At least on my machine (Windows XP SP2, Mathematica 7.0.0), the peak
>value in the 2nd graph is a little higher than that in the 1st one.

You are right. When I looked at the resulting plot, I failed to
look carefully enough to notice the slight difference. And after
thinking about this, I see what is occurring. To ensure the
labels on the axis show correctly, Mathematica shrinks the
graphic slightly. In fact, I have a dim memory of seeing
somewhere the adjustment is 5% on both ends. This can be
compensated for by adjusting the plot range on one graphic. For example:

Grid@{{Plot[{Sin[2 x], 1}, {x, 0, 4}, PlotRange -> {-1.1, 1.1},
     AxesOrigin -> {0, 0}], Style[Rotate["=E2=89=88", 90 Degree], 20],
    Plot[{Cos[2 x], 1}, {x, 6, 10}, PlotRange -> {-1.1, 1.1} 1.1,
     Axes -> {True, False}]}}

Here, I've added a line at y = 1 to both plots to make any
misalignment more apparent.




  • Prev by Date: Re: Bug in Rational arithmetic?
  • Next by Date: Re: Mathematica documentation - for newest and older versions
  • Previous by thread: Re: Re: Advanced plotting
  • Next by thread: Mathematica SIG (Washington DC Area)