Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]
Groups > comp.soft-sys.math.mathematica > #2249 > unrolled thread
| Started by | ValeX <rjovale@gmail.com> |
|---|---|
| First post | 2011-05-10 00:21 +0000 |
| Last post | 2011-05-11 08:25 +0000 |
| Articles | 2 — 2 participants |
Back to article view | Back to comp.soft-sys.math.mathematica
PlotStyle does not work when Plot is fed Table ValeX <rjovale@gmail.com> - 2011-05-10 00:21 +0000
Re: PlotStyle does not work when Plot is fed Table Szabolcs Horvát <szhorvat@gmail.com> - 2011-05-11 08:25 +0000
| From | ValeX <rjovale@gmail.com> |
|---|---|
| Date | 2011-05-10 00:21 +0000 |
| Subject | PlotStyle does not work when Plot is fed Table |
| Message-ID | <iqa0ds$d9u$1@smc.vnet.net> |
Hello,
take for instance this example:
Plot[Table[x^i, {i, 1, 3}], {x, 0, 1.5}, PlotStyle -> {Red, Green,
Blue}]
Mathematica gives me all the curves in blue. Any ideas?
Thanks.
[toc] | [next] | [standalone]
| From | Szabolcs Horvát <szhorvat@gmail.com> |
|---|---|
| Date | 2011-05-11 08:25 +0000 |
| Message-ID | <iqdh6b$16g$1@smc.vnet.net> |
| In reply to | #2249 |
On 2011.05.10. 2:21, ValeX wrote:
> Hello,
> take for instance this example:
>
> Plot[Table[x^i, {i, 1, 3}], {x, 0, 1.5}, PlotStyle -> {Red, Green,
> Blue}]
>
> Mathematica gives me all the curves in blue. Any ideas?
> Thanks.
>
In order for Plot to be able to work correctly, you need to give it an
explicit list of the functions to be plotted. In this example you can
achieve this by evaluating the Table before Plot sees it:
Plot[Table[x^i, {i, 1, 3}] // Evaluate, {x, 0, 1.5},
PlotStyle -> {Red, Green, Blue}]
[toc] | [prev] | [standalone]
Back to top | Article view | comp.soft-sys.math.mathematica
csiph-web