Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]
Groups > comp.soft-sys.math.mathematica > #12985 > unrolled thread
| Started by | Bill Rowe <readnews@sbcglobal.net> |
|---|---|
| First post | 2012-12-29 20:09 +0000 |
| Last post | 2012-12-29 20:09 +0000 |
| Articles | 1 — 1 participant |
Back to article view | Back to comp.soft-sys.math.mathematica
Re: format legend? Bill Rowe <readnews@sbcglobal.net> - 2012-12-29 20:09 +0000
| From | Bill Rowe <readnews@sbcglobal.net> |
|---|---|
| Date | 2012-12-29 20:09 +0000 |
| Subject | Re: format legend? |
| Message-ID | <kbnikt$1c6$1@smc.vnet.net> |
On 12/28/12 at 5:33 AM, dario.rehman@gmail.com (dabd) wrote:
>Plot[Evaluate[{(b/(b + 1)) (n/(1 - n))} /.
>n -> Range[0.05, 0.40, 0.05]], {b, 0, 2}, PlotLegends ->
>Table[StringForm["n=``", ToString[k, InputForm, NumberMarks :>
>False]], {k, 0.05, 0.40, 0.05}]]
>How can I format the numbers in the legend with 2 decimal places?
Try NumberForm as in:
Plot[Evaluate[{(b/(b + 1)) (n/(1 - n))} /.
n -> Range[0.05, 0.40, 0.05]], {b, 0, 2},
PlotLegends ->
Table["n=" <> ToString[NumberForm[k, {3, 2}]], {k, 0.05, 0.40,
0.05}]]
Back to top | Article view | comp.soft-sys.math.mathematica
csiph-web