Re: Number Formatting Along Axes
- To: mathgroup at smc.vnet.net
- Subject: [mg81521] Re: Number Formatting Along Axes
- From: michael.p.croucher at googlemail.com
- Date: Wed, 26 Sep 2007 06:48:11 -0400 (EDT)
- References: <fd59bs$38o$1@smc.vnet.net>
On 23 Sep, 09:50, Bruce Colletti <vze26... at verizon.net> wrote: > Re 6.0.1. > > By default, y-axis values display in scientific form. How can a user specify another format, e.g., XXXXX.XX or integer? > > Thankx. > > Bruce Hi Bruce The Ticks option will do what you need. If you run the following two commands then you will get a plot with Scientific notation in the y axis: data = Table[n^2, {n, 10000000, 100000000, 10000000}]; ListPlot[data] The following will use integer tick marks on the y axis ListPlot[data, Ticks -> {Automatic, Table[n, {n, 2*10^15, 1*10^16, 2*10^15}]}] The following makes use of Ticks and NumberForm to output numbers with 3 digits after the decimal point ListPlot[data, Ticks -> {Automatic, Table[{n, NumberForm[n, {1, 3}]}, {n,2*10^15, 1*10^16, 2*10^15}]}] Hope this helps, Mike