MathGroup Archive 1999

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

Search the Archive

Re: axes in ListPlot

  • To: mathgroup at smc.vnet.net
  • Subject: [mg19612] Re: axes in ListPlot
  • From: "Allan Hayes" <hay at haystack.demon.co.uk>
  • Date: Sat, 4 Sep 1999 21:09:17 -0400
  • References: <7qqc63$4hc@smc.vnet.net>
  • Sender: owner-wri-mathgroup at wolfram.com

Hung-Jen Wang <hjwang at ieas.econ.sinica.edu.tw> wrote in message
news:7qqc63$4hc at smc.vnet.net...
> Hi,
>
>      I have a list like this:
>
>   aa = {10, 15, 21, 13}
--
>
> .  If I use
>      ListPlot[aa, PlotJoined->True]
> to plot the list, it looks fine.  However, if I want to force the origin
to
> be {0,0} by using
>      ListPlot[aa, PlotJoined->True, AxesOrigin->{0,0}]
> , then the axes appear broken.  I mean, for instance, only the part of y
> axis between 10 and 21 shows up in the graph.  Is there any way to make
the
> graph looks "normal"?  I am using Mathematica 3.0.  Thanks in advance.
>
> H.J. Wang
>

The extent of the axes is determned by the plot range

aa = {10, 15, 21, 13};

ListPlot[aa, PlotJoined -> True, AxesOrigin -> {0, 0},
  PlotRange -> {{0, 4}, {0, 21}}]

This feature is not just for ListPlot:

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

Allan
---------------------
Allan Hayes
Mathematica Training and Consulting
Leicester UK
www.haystack.demon.co.uk
hay at haystack.demon.co.uk
Voice: +44 (0)116 271 4198
Fax: +44 (0)870 164 0565





  • Prev by Date: FindMinimum to minimize e . w . e
  • Next by Date: Re: axes in ListPlot
  • Previous by thread: Re: axes in ListPlot
  • Next by thread: Re: axes in ListPlot