Re: Plot and axes
- To: mathgroup at smc.vnet.net
- Subject: [mg52211] Re: Plot and axes
- From: Peter Pein <petsie at arcor.de>
- Date: Sun, 14 Nov 2004 20:15:08 -0500 (EST)
- References: <cn7af6$ej5$1@smc.vnet.net>
- Sender: owner-wri-mathgroup at wolfram.com
Steven Shippee wrote:
> 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
>
See Mathematica-Book
2.9.5 Labeling TwoDimensional Graphics
Use the Ticks option:
Plot[0, {x, -4, 4}, PlotRange -> {-4, 4}, GridLines -> Automatic,
AspectRatio -> .9, ImageSize -> 400,
Ticks -> (Range[Floor[#1], Floor[#2]] &)];
--
Peter Pein
Berlin