Re: DiscretePlot filling is darker above axis than below
- To: mathgroup at smc.vnet.net
- Subject: [mg121365] Re: DiscretePlot filling is darker above axis than below
- From: "Christopher O. Young" <cy56 at comcast.net>
- Date: Mon, 12 Sep 2011 04:22:37 -0400 (EDT)
- Delivered-to: l-mathgroup@mail-archive0.wolfram.com
- References: <j4cnjh$hjr$1@smc.vnet.net> <j4fhuo$2gp$1@smc.vnet.net>
Thanks very much, that helps a lot. Amazing the amount of choices one has!
On 9/10/11 7:33 AM, in article j4fhuo$2gp$1 at smc.vnet.net, "Oleksandr
Rasputinov" <oleksandr_rasputinov at hmamail.com> wrote:
> On Fri, 09 Sep 2011 10:51:45 +0100, Christopher O. Young
> <cy56 at comcast.net> wrote:
>
>> Can't seem to get the filling to come out the same darkness above and
>> below
>> the axis.
>>
>> Show[
>> DiscretePlot[
>> Sin[t], {t, 0, 2 \[Pi], \[Pi]/6},
>> ExtentSize -> \[Pi]/12,
>> PlotStyle -> {Red, Opacity[0.5]},
>> Filling -> Axis,
>> FillingStyle -> {Red, Opacity[0.5]}
>> ],
>> Plot[Sin[t], {t, 0, 2 Pi}
>> ]
>> ]
>>
>
> According to the documentation of DiscretePlot,
>
> Filling -> Axis, FillingStyle -> {Red, Opacity[0.5]}
>
> means that bars above the axis will be red, and bars below will be 50%
> opaque. If you want them to be both red and 50% opaque regardless of
> position above or below the axis, you should use
>
> Directive[Red, Opacity[0.5]]
>
> although using this Directive for both PlotStyle and FillingStyle results
> in 75% opaque regions where the fill and markers are drawn on top of one
> another. Ordinarily one would solve this by specifying PlotStyle -> None,
> but for some reason DiscretePlot does not respond to this setting, and so
> we must draw completely transparent plot markers to get the same effect:
>
> Show[
> DiscretePlot[
> Sin[t], {t, 0, 2 \[Pi], \[Pi]/6},
> ExtentSize -> \[Pi]/12,
> PlotStyle -> Opacity[0],
> Filling -> Axis,
> FillingStyle -> Directive[Red, Opacity[0.5]]
> ],
> Plot[Sin[t], {t, 0, 2 Pi}
> ]
> ]