MathGroup Archive 2009

[Date Index] [Thread Index] [Author Index]

Search the Archive

Re: inconsistent synatx for FillingStyle and PlotStyle?

  • To: mathgroup at smc.vnet.net
  • Subject: [mg103134] Re: [mg103115] inconsistent synatx for FillingStyle and PlotStyle?
  • From: Jaebum Jung <jaebum at wolfram.com>
  • Date: Wed, 9 Sep 2009 04:41:38 -0400 (EDT)
  • References: <200909080959.FAA26659@smc.vnet.net>

You can try the followings:

ListPlot[{{{1, 1}}, {{2, 3}}}, Filling -> Axis,
 FillingStyle -> {1 -> Red, 2 -> Blue}, PlotStyle -> {Red, Blue},
 AxesOrigin -> {0, 0}]

- Jaebum



Nasser Abbasi wrote:
> 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
>
>
>
>
>
>
>
>   



  • Prev by Date: Re: Transforming a list
  • Next by Date: Re: Transforming a list
  • Previous by thread: inconsistent synatx for FillingStyle and PlotStyle? or How to make vertical lines in ListPlot have diffenent colors?
  • Next by thread: Re: inconsistent synatx for FillingStyle and PlotStyle?