Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]
Groups > comp.soft-sys.math.mathematica > #4911
| From | Chris Degnen <degnen@cwgsy.net> |
|---|---|
| Newsgroups | comp.soft-sys.math.mathematica |
| Subject | Re: DiscretePlot filling is darker above axis than below |
| Date | 2011-09-13 11:26 +0000 |
| Organization | Steven M. Christensen and Associates, Inc and MathTensor, Inc. |
| Message-ID | <j4nel0$535$1@smc.vnet.net> (permalink) |
| References | <201109090950.FAA18009@smc.vnet.net> <1de9e293d71b7429bb9b22b43bc6aaae.squirrel@webmail.univie.ac.at> |
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}]]
Back to comp.soft-sys.math.mathematica | Previous | Next | Find similar | Unroll thread
Re: DiscretePlot filling is darker above axis than below Chris Degnen <degnen@cwgsy.net> - 2011-09-13 11:26 +0000
csiph-web