Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]
Groups > comp.soft-sys.math.mathematica > #12985
| From | Bill Rowe <readnews@sbcglobal.net> |
|---|---|
| Newsgroups | comp.soft-sys.math.mathematica |
| Subject | Re: format legend? |
| Date | 2012-12-29 20:09 +0000 |
| Message-ID | <kbnikt$1c6$1@smc.vnet.net> (permalink) |
| Organization | Time-Warner Telecom |
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 comp.soft-sys.math.mathematica | Previous | Next | Find similar | Unroll thread
Re: format legend? Bill Rowe <readnews@sbcglobal.net> - 2012-12-29 20:09 +0000
csiph-web