Mathematica 9 is now available
Services & Resources / Wolfram Forums / MathGroup Archive
-----

MathGroup Archive 2011

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

Search the Archive

Re: DiscretePlot filling is darker above axis than below

  • To: mathgroup at smc.vnet.net
  • Subject: [mg121389] Re: DiscretePlot filling is darker above axis than below
  • From: Chris Degnen <degnen at cwgsy.net>
  • Date: Tue, 13 Sep 2011 07:20:42 -0400 (EDT)
  • Delivered-to: l-mathgroup@mail-archive0.wolfram.com
  • References: <201109090950.FAA18009@smc.vnet.net> <1de9e293d71b7429bb9b22b43bc6aaae.squirrel@webmail.univie.ac.at>

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