MathGroup Archive 2011

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

Search the Archive

Re: DiscretePlot filling is darker above axis than below


On Sep 10, 12:33 pm, Christopher Young <c... at comcast.net> wrote:
> Thanks very much, that fixed it. Just have to remember to use Directive[ ] when I've got more than one style specifier.
>

You can also specify the colours above and below the axis explicitly.

a = Show[DiscretePlot[Sin[t], {t, 0, 2 \[Pi], \[Pi]/6},
    Filling -> Axis,
    FillingStyle -> {{Red, Opacity[0.5]}, {Red, Opacity[0.5]}}],
   Plot[Sin[t], {t, 0, 2 Pi}]];


b = Show[DiscretePlot[Sin[t], {t, 0, 2 \[Pi], \[Pi]/6},
    Filling -> Axis, FillingStyle -> Directive[{Red, Opacity[0.5]}]],
   Plot[Sin[t], {t, 0, 2 Pi}]];

(*Comparing differences*)

Complement[StringSplit[ToString[FullForm[a]], ","],
 StringSplit[ToString[FullForm[b]], ","]]

Complement[StringSplit[ToString[FullForm[b]], ","],
 StringSplit[ToString[FullForm[a]], ","]]

(* Colour below axis green and above red *)

Show[DiscretePlot[Sin[t], {t, 0, 2 \[Pi], \[Pi]/6}, Filling -> Axis,
  FillingStyle -> {{Green, Opacity[0.5]}, {Red, Opacity[0.5]}}],
 Plot[Sin[t], {t, 0, 2 Pi}]]





  • Prev by Date: Re: Step increase in Table
  • Next by Date: Re: BarChart Labeling
  • Previous by thread: Re: DiscretePlot filling is darker above axis than below
  • Next by thread: Re: DiscretePlot filling is darker above axis than below