Plots, Lists, and line colors (Was: What's going on here (Table-generated lists)?)
- To: mathgroup at smc.vnet.net
- Subject: [mg98125] Plots, Lists, and line colors (Was: What's going on here (Table-generated lists)?)
- From: AES <siegman at stanford.edu>
- Date: Tue, 31 Mar 2009 04:15:49 -0500 (EST)
- Organization: Stanford University
- References: <gqn8ua$p$1@smc.vnet.net> <gqq3tm$7n8$1@smc.vnet.net>
So far we know that Plot[{x, x^2, x^3}, {x, 0, 1}] gives 3 default colors Plot[{{x, x^2, x^3}}, {x, 0, 1}] gives 3 default colors Plot[{x, x^2, x^3}, {x, 0, 1}, PlotStyle -> {Red, Green, Blue}] gives 3 designated colors Plot[Table[x^n, {n, 1, 3}], {x, 0, 1}, PlotStyle -> {Red, Green, Blue}] gives single color -- and it's NOT Red But if you Evaluate the table you get 3 designated colors Plot[0.8 {x, x^2, x^3}, {x, 0, 1}, PlotStyle -> {Red, Green, Blue}] gives single color, not Red Plot[List[x, x^2, x^3], {x, 0, 1}, PlotStyle -> {Red, Green, Blue}] gives 3 designated colors (meaning, List[] gets evaluated, even though Table didn't?) Plot[List[{x, x^2, x^3}], {x, 0, 1}, PlotStyle -> {Red, Green, Blue}] gives 3 designated colors (List in this variant form also gets evaluated?) QUIZ: What will the following give? Plot[0.5 List[{x, x^2, x^3}], {x, 0, 1}, PlotStyle -> {Red, Green,Blue}] Plot[List[0.5 {x, x^2, x^3}], {x, 0, 1}, PlotStyle -> {Red, Green, Blue}]