Re: Re: label origin on plot
- To: mathgroup at smc.vnet.net
- Subject: [mg57661] Re: [mg57616] Re: [mg57583] label origin on plot
- From: Murray Eisenberg <murray at math.umass.edu>
- Date: Fri, 3 Jun 2005 05:33:55 -0400 (EDT)
- Organization: Mathematics & Statistics, Univ. of Mass./Amherst
- References: <200506020916.FAA11888@smc.vnet.net>
- Reply-to: murray at math.umass.edu
- Sender: owner-wri-mathgroup at wolfram.com
The method of showing part of a frame does not give felicitous results if, e.g, the plot of 1 - x^2 is to be done on domain from -1 to 1. If you open just about any calculus text, e.g., to a 2D graph plot, you'll see axes going through the pont (0, 0) and with that point labelled with a single 0. It's unfortunate that Mathematica does not provide an option to Plot to reproduce this well-established behavior. It's just plain annoying that one has to resort to the work-around of using an Epilog with a Text primitive. David Park wrote: > I'm a little surprised. With a standard Axes plot it does not seem possible > to get the zero ticks labeled. > > Plot[1 - x^2, {x, 0, 1}]; > > Extending the lower plot range and even explicitly labeling the ticks still > does not work. > > Plot[1 - x^2, {x, 0, 1}, > Ticks -> {Table[{i, i}, {i, 0, 1, 0.2}], Table[{i, i}, {i, 0, 1, 0.2}]}, > PlotRange -> {{-0.05, 1}, {-0.05, 1}}]; > > But using a Frame (which is generally better anyway) and extending the lower > plot range will label the zero points. > > Plot[1 - x^2, {x, 0, 1}, > Frame -> True, > PlotRange -> {{-0.01, 1}, {-0.01, 1}}]; > > If you don't want to show the entire Frame you can use... > > Plot[1 - x^2, {x, 0, 1}, > Frame -> {True, True, False, False}, > PlotRange -> {{-0.01, 1}, {-0.01, 1}}]; > > David Park > djmp at earthlink.net > http://home.earthlink.net/~djmp/ > > > From: ptv-list at socilogy.osu.edu [mailto:von-hippel.1 at osu.edu] To: mathgroup at smc.vnet.net > > > In a 2-dimensional plot, Mathematica typically does not label the > origin. I would like X=0 to be labeled as "0." Is this possible? > > > > > -- Murray Eisenberg murray at math.umass.edu Mathematics & Statistics Dept. Lederle Graduate Research Tower phone 413 549-1020 (H) University of Massachusetts 413 545-2859 (W) 710 North Pleasant Street fax 413 545-1801 Amherst, MA 01003-9305
- References:
- Re: label origin on plot
- From: "David Park" <djmp@earthlink.net>
- Re: label origin on plot