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


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

DiscretePlot filling is darker above axis than below

Started by"Christopher O. Young" <cy56@comcast.net>
First post2011-09-09 09:51 +0000
Last post2011-09-12 08:30 +0000
Articles 4 — 3 participants

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


Contents

  DiscretePlot filling is darker above axis than below "Christopher O. Young" <cy56@comcast.net> - 2011-09-09 09:51 +0000
    Re: DiscretePlot filling is darker above axis than below Peter Breitfeld <phbrf@t-online.de> - 2011-09-10 11:32 +0000
    Re: DiscretePlot filling is darker above axis than below "Oleksandr Rasputinov" <oleksandr_rasputinov@hmamail.com> - 2011-09-10 11:33 +0000
      Re: DiscretePlot filling is darker above axis than below "Christopher O. Young" <cy56@comcast.net> - 2011-09-12 08:30 +0000

#4841 — DiscretePlot filling is darker above axis than below

From"Christopher O. Young" <cy56@comcast.net>
Date2011-09-09 09:51 +0000
SubjectDiscretePlot filling is darker above axis than below
Message-ID<j4cnjh$hjr$1@smc.vnet.net>
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}
  ]
 ]

[toc] | [next] | [standalone]


#4848

FromPeter Breitfeld <phbrf@t-online.de>
Date2011-09-10 11:32 +0000
Message-ID<j4fhrq$2gc$1@smc.vnet.net>
In reply to#4841
"Christopher O. Young" 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}
>   ]
>  ]
>
>

Use Directive:

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

-- 
_________________________________________________________________
Peter Breitfeld, Bad Saulgau, Germany -- http://www.pBreitfeld.de

[toc] | [prev] | [next] | [standalone]


#4851

From"Oleksandr Rasputinov" <oleksandr_rasputinov@hmamail.com>
Date2011-09-10 11:33 +0000
Message-ID<j4fhuo$2gp$1@smc.vnet.net>
In reply to#4841
On Fri, 09 Sep 2011 10:51:45 +0100, Christopher O. Young  
<cy56@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}
  ]
]

[toc] | [prev] | [next] | [standalone]


#4893

From"Christopher O. Young" <cy56@comcast.net>
Date2011-09-12 08:30 +0000
Message-ID<j4kfvc$kiq$1@smc.vnet.net>
In reply to#4851
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@smc.vnet.net, "Oleksandr
Rasputinov" <oleksandr_rasputinov@hmamail.com> wrote:

> On Fri, 09 Sep 2011 10:51:45 +0100, Christopher O. Young
> <cy56@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}
>   ]
> ]

[toc] | [prev] | [standalone]


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


csiph-web