Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]


Groups > comp.soft-sys.math.mathematica > #4911 > unrolled thread

Re: DiscretePlot filling is darker above axis than below

Started byChris Degnen <degnen@cwgsy.net>
First post2011-09-13 11:26 +0000
Last post2011-09-13 11:26 +0000
Articles 1 — 1 participant

Back to article view | Back to comp.soft-sys.math.mathematica

This discussion starts older than the indexed window; earlier articles aren't shown. The article labeled Started by below is the oldest one visible, not the original post.


Contents

  Re: DiscretePlot filling is darker above axis than below Chris Degnen <degnen@cwgsy.net> - 2011-09-13 11:26 +0000

#4911 — Re: DiscretePlot filling is darker above axis than below

FromChris Degnen <degnen@cwgsy.net>
Date2011-09-13 11:26 +0000
SubjectRe: DiscretePlot filling is darker above axis than below
Message-ID<j4nel0$535$1@smc.vnet.net>
On Sep 10, 12:33 pm, Christopher Young <c...@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}]]

[toc] | [standalone]


Back to top | Article view | comp.soft-sys.math.mathematica


csiph-web