Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]
Groups > comp.soft-sys.math.mathematica > #7328
| From | Armand Tamzarian <mike.honeychurch@gmail.com> |
|---|---|
| Newsgroups | comp.soft-sys.math.mathematica |
| Subject | Re: precision of y-axis values in plot |
| Date | 2011-12-18 09:38 +0000 |
| Organization | Steven M. Christensen and Associates, Inc and MathTensor, Inc. |
| Message-ID | <jckcam$1lt$1@smc.vnet.net> (permalink) |
| References | <jccgik$min$1@smc.vnet.net> <jcf8kl$70m$1@smc.vnet.net> <jchh8v$ida$1@smc.vnet.net> |
On Dec 17, 6:44 pm, Nathan <nhroll...@gmail.com> wrote:
> On Dec 16, 4:04 am, Armand Tamzarian <mike.honeychu...@gmail.com>
> wrote:
>
>
>
>
>
>
>
>
>
> > On Dec 15, 9:01 pm, Nathan <nhroll...@gmail.com> wrote:
>
> > > Hi,
>
> > > I'm relatively new to Mathematica. I'm having a problem with the
> > > precision of the y-axis values of some of my plots. All of the data
> > > labels show up as "2422.3", which isn't very informative since they're
> > > all the same. I need the plot to show two more decimal point values
> > > (ex: "2422.305"). I've looked high and low and can't find any way to
> > > do this. Any ideals? Thanks!
>
> > > Nathan.
>
> > What you need to do is make a tick function and wrap NumberForm around
> > your labels and set the number of decimal points that you want. If you
> > do a search on here for tick functions and NumberForm you should find
> > many examples.
>
> > Mike
>
> Mike,
>
> Thank you for your help. Forgive my ignorance, but what should I put
> in the NumberForm function? Here's the plot command I'm using:
>
> plot2T := Plot[LT2[T, \[Lambda]], {T, min2, max2}, Frame -> True,
> FrameLabel -> {{"Task Execution Time (s)", ""}, {"Optimal CSCP
> Checkpoint Interval (s)", ""}}, FrameStyle -> {{Black, White},
> {Black, White}}, Axes -> {False, False}]
>
> Based on what you said, I assume I should add something like the
> following to the Plot function:
> Tick -> NumberForm[ N[?], 8]
>
> However, I'm not sure what should replace the ?. Will you please
> indulge a newbie with a specific example? Thanks!
tickFunction[min_, max_] := Table[{i, NumberForm[i, {3, 4}]}, {i, min,
max, 1/7}]
Plot[Sin[x], {x, 0, 1}, Ticks -> tickFunction]
You will need to read the documentation on Ticks and NumberForm to get
this to do exactly what you want.
Mike
Back to comp.soft-sys.math.mathematica | Previous | Next — Previous in thread | Next in thread | Find similar | Unroll thread
precision of y-axis values in plot Nathan <nhrollins@gmail.com> - 2011-12-15 10:01 +0000
Re: precision of y-axis values in plot Armand Tamzarian <mike.honeychurch@gmail.com> - 2011-12-16 11:04 +0000
Re: precision of y-axis values in plot Nathan <nhrollins@gmail.com> - 2011-12-17 07:44 +0000
Re: precision of y-axis values in plot Armand Tamzarian <mike.honeychurch@gmail.com> - 2011-12-18 09:38 +0000
Re: precision of y-axis values in plot DrMajorBob <btreat1@austin.rr.com> - 2011-12-19 12:26 +0000
Re: precision of y-axis values in plot DrMajorBob <btreat1@austin.rr.com> - 2011-12-20 08:04 +0000
Re: precision of y-axis values in plot Heike Gramberg <heike.gramberg@gmail.com> - 2011-12-20 08:06 +0000
Re: precision of y-axis values in plot Mike H <mike.honeychurch@gmail.com> - 2011-12-19 12:18 +0000
Re: precision of y-axis values in plot DrMajorBob <btreat1@austin.rr.com> - 2011-12-20 08:05 +0000
csiph-web