inconsistent synatx for FillingStyle and PlotStyle? or How to make vertical lines in ListPlot have diffenent colors?
- To: mathgroup at smc.vnet.net
- Subject: [mg103115] inconsistent synatx for FillingStyle and PlotStyle? or How to make vertical lines in ListPlot have diffenent colors?
- From: "Nasser Abbasi" <nma at 12000.org>
- Date: Tue, 8 Sep 2009 05:59:33 -0400 (EDT)
- Reply-to: "Nasser Abbasi" <nma at 12000.org>
Problem: Make a ListPlot, and have each Point be a different color. Solution: Use Directive ListPlot[{{{1, 1}}, {{2, 3}}}, PlotStyle -> {Directive[Red], Directive[Blue]}, AxesOrigin -> {0, 0}] Problem : Make a ListPlot, but with vertical lines, and have each line be a different color. You would expect the synatx to be the same as above, just use Filling->Axis and use FillingStyle-> insteadl of PlotStyle->, right? But it does not work Solution attempt: ListPlot[{{{1, 1}}, {{2, 3}}}, Filling -> Axis, FillingStyle -> {Directive[Red], Directive[Blue]}, AxesOrigin -> {0, 0}] Now I looked at help, and it says: "Directives can be combined using Directive[g1,g2,....]" So, I tried this ListPlot[{{{1, 1}}, {{2, 3}}}, Filling -> Axis, FillingStyle -> Directive[Red, Blue], AxesOrigin -> {0, 0}] And this did not work either. I also tried ListPlot[{{{1, 1}}, {{2, 3}}}, FillingStyle -> {Red, Blue}, AxesOrigin -> {0, 0}, Filling -> Axis] I also tried ListPlot[{{{1, 1}}, {{2, 3}}}, FillingStyle -> Directive[{Red, Blue}], AxesOrigin -> {0, 0}, Filling -> Axis] Am I getting any closer? I tried above 10 other ways, and can't get it to do this. so I give up :) Any idea how to make each vertical line be colored differently according to my own list of colors? thanks, --Nasser
- Follow-Ups:
- Re: inconsistent synatx for FillingStyle and PlotStyle?
- From: Jaebum Jung <jaebum@wolfram.com>
- Re: inconsistent synatx for FillingStyle and PlotStyle?