Re: Plot and axes
- To: mathgroup at smc.vnet.net
- Subject: [mg52210] Re: [mg52197] Plot and axes
- From: "David Park" <djmp at earthlink.net>
- Date: Sun, 14 Nov 2004 20:15:07 -0500 (EST)
- Sender: owner-wri-mathgroup at wolfram.com
Steven, Specify the ticks and grids as follows. Plot[0, {x, -4, 4}, PlotRange -> {-4, 4}, Frame -> False, Ticks -> {Range[-4, 4, 1], Range[-4, 4, 1]}, GridLines -> {Range[-4, 4, 1], Range[-4, 4, 1]}, AspectRatio -> .9, ImageSize -> 400]; There are two small problems with that. Why is the AspectRatio 0.9 instead of Automatic or 1. Wouldn't a square grid be preferable in this case, which I guess is just making a piece of graph paper. A second problem is in using Axes instead of a Frame. The grid lines hide the minus signs on the negative y axis, and also the tick labels are in the middle of the graph paper where they can interfer with a plotted graph. If you page through Science magazine, say, it is nearly impossible to find a graph with axes and tick labels in the middle of the graph. A Frame resolves these problems. Plot[0, {x, -4, 4}, PlotRange -> {{-4, 4}, {-4, 4}}1.05, Frame -> True, Axes -> False, FrameTicks -> {Range[-4, 4, 1], Range[-4, 4, 1], None, None}, GridLines -> {Range[-4, 4, 1], Range[-4, 4, 1]}, AspectRatio -> Automatic, ImageSize -> 400]; Also, if you just want to make graph paper, it can be done without the artifice of plotting a zero function. Here I label only every other tick to make the graph paper less cluttered. Show[Graphics[{}], PlotRange -> {{-4, 4}, {-4, 4}}1.05, Frame -> True, Axes -> False, FrameTicks -> {Range[-4, 4, 2], Range[-4, 4, 2], None, None}, GridLines -> {Range[-4, 4, 1], Range[-4, 4, 1]}, AspectRatio -> Automatic, ImageSize -> 400]; David Park djmp at earthlink.net http://home.earthlink.net/~djmp/ -----Original Message----- From: Steven Shippee [mailto:slshippee at comcast.net] To: mathgroup at smc.vnet.net Subject: [mg52210] [mg52197] Plot and axes I would like to get the marks on my "x" axis to show as '1, 2, 3, 4', just like the "y" axis, but by default they show as '2,4' - is there an easy way to find this in the help files? coordaxes = Plot[0, {x, -4, 4}, PlotRange -> {-4, 4}, Frame -> False, GridLines -> Automatic, AspectRatio -> .9, ImageSize -> 400]; I did an Options[Plot] but could not figure out how to do it from there. Thanks in advance, Steven Shippee slshippee at comcast.net