       RE: Plotting unfilled bars in GeneralizedBarChart

• To: mathgroup at smc.vnet.net
• Subject: [mg31168] RE: [mg31157] Plotting unfilled bars in GeneralizedBarChart
• From: "David Park" <djmp at earthlink.net>
• Date: Tue, 16 Oct 2001 01:18:43 -0400 (EDT)
• Sender: owner-wri-mathgroup at wolfram.com

```John,

Here is one method. Skip the Graphics`Graphics` routine and define your own
bars. Then draw them using Epilog in a FilledPlot. You need to give an
explicit PlotRange because PlotRange -> All does not seem to properly
account for items in Epilog. In Epilog, the bar function is Applied to all
of the data points.

Needs["Graphics`Colors`"]
Needs["Graphics`FilledPlot`"]

bar[x_, value_, width_] :=
With[{w = width/2},
Line[{{x - w, 0}, {x + w, 0}, {x + w, value}, {x - w, value}, {x - w,
0}}]];

bardata = Table[{x, x^2/30}, {x, 10}];

FilledPlot[Sin[x], {x, 0, 10}, Fills -> Salmon,
Epilog -> ((bar[#1, #2, 3/4] & ) @@ #1 & ) /@
bardata, PlotRange -> {{0, 11}, {-1, 3.5}}];

David Park

> From: John Novak [mailto:jnovak at math.usc.edu]
To: mathgroup at smc.vnet.net
>
>
> I am trying to overlay a barchart on top of a filled plot, and I
> would like
> the bars to be transparent so that the plot below will show through.  Is
> there a way that I can set the BarStyle option so that the bars
> are not filled?
>
> Thanks,
>
> John Novak
>
>

```

• Prev by Date: Re: How do I eliminate premultipliers of "1." ?
• Next by Date: Formula for sum of integrals of polynomials
• Previous by thread: Re: Plotting unfilled bars in GeneralizedBarChart