MathGroup Archive 1998

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

Search the Archive

Re: Problem With AxesOrigin

  • To: mathgroup at smc.vnet.net
  • Subject: [mg14942] Re: Problem With AxesOrigin
  • From: paulh (P.J. Hinton)
  • Date: Fri, 27 Nov 1998 03:49:40 -0500
  • Organization: Wolfram Research, Inc.
  • References: <73i36c$q20@smc.vnet.net>
  • Sender: owner-wri-mathgroup at wolfram.com

In article <73i36c$q20 at smc.vnet.net>, Wretch <arc at astro.columbia.edu>
writes: |> Hello -- sometimes when I plot a function  Mathematica
decides to put |> the origin of the coordinate system in a spot where I
don't want it.  |> The natural fix seems to be the option AxesOrigin. 
For instance, |> 
|> Plot[ugly[x],{x,a,b},AxesOrigin->{0,0}] |> 
|> 
|> Simple enough.  However, there are times when Mathematica appears to
be |> trying to place the origin of the coordinate system where I want
it, |> but it doesn't print out the axis lines near the region of my
origin of |> choice.  It's as if it recognizes where I want the origin,
but it |> doesn't want to print out the axes in the normal manner. |> 
|> It's hard to explain in words...here's a graphical illustration |> 
|> Unwanted Origin = {1,1} (Mathematica's initial choice): |> 
|>        |
|>        |
|>        |
|>        |
|>        |__________    
|>      (1,1)
|> 
|> 
|> When I use AxesOrigin->{0,0}
|> 
|> 
|>        |
|>        |
|>        | 
|>        |  
|>        
|>            __________
|>      (0,0)
|> 
|> 
|> Note how Mathematica curiously omits segments of the axis lines near
the |> origin of my choice.
|> 
|> Has anyone else out there experienced this?  How may I remedy it?

The reason you are encountering this problem is that you have specified 
an axis origin that is outside the PlotRange of the original graphic.
The behavior is documented in the book _Mathematica Graphics:
Techiniques & Applications_ by Tom Wickham-Jones.

The fix is to specify a PlotRange that includes both the origin and the
line.

(* BAD *)

Plot[x, {x,1,2}, AxesOrigin -> {0,0}]

(* GOOD *)

Plot[x, {x,1,2}, AxesOrigin -> {0,0},PlotRange -> {{0,3},{0,3}}]

--
P.J. Hinton	
Mathematica Programming Group		paulh at wolfram.com Wolfram Research,
Inc.			http://www.wolfram.com/~paulh/ Disclaimer: Opinions expressed
herein are those of the author alone.


  • Prev by Date: Re: Damaged Mathematica Systems Files, and Deleting Mathematica Caches?
  • Next by Date: Re: HELP! I'm gonna go postal...
  • Previous by thread: Re: Problem With AxesOrigin
  • Next by thread: Re: Stupid problems on bracket and parenthesis!