Re: Re: BarChart Range
- To: mathgroup at smc.vnet.net
- Subject: [mg103620] Re: [mg103579] Re: [mg103551] BarChart Range
- From: Brett Champion <brettc at wolfram.com>
- Date: Wed, 30 Sep 2009 05:02:01 -0400 (EDT)
- References: <28656482.1254107571753.JavaMail.root@n11> <200909291137.HAA25545@smc.vnet.net>
On Sep 29, 2009, at 6:37 AM, David Park wrote: > I may be missing something, some option or other, but this seems to > be a > case where set-piece plot design is very nice until you want to step a > little beyond it. The problem here comes if you want to label the > bars. > > The simple answer to your question is to use ChartElementFunction > and write > a bar function that starts at 40 instead of at 0. > > g[{{xmin_, xmax_}, {ymin_, ymax_}}, ___] := > Polygon[{{xmin, 40}, {xmax, 40}, {xmax, ymax}, {xmin, ymax}}] > Of course you can use the actual functions to draw the bars: g[{{xmin_, xmax_}, {ymin_, ymax_}}, rest___] := ChartElementData["Rectangle"][{{xmin, xmax}, {40, ymax}}, rest] > BarChart[{43.34, 43.60, 44.19, 44.73}, > ChartElementFunction -> g, > AxesOrigin -> {0, 40}, > PlotRange -> {40, 50}] > > Here is the same chart that is labeled above: > > BarChart[{43.34, 43.60, 44.19, 44.73}, > ChartElementFunction -> g, > ChartLabels -> Placed[{"a", "b", "c", "d"}, Above], > AxesOrigin -> {0, 40}, > PlotRange -> {40, 50}] > > But there doesn't appear to be any simple method to label the bars > just > below the axis. One can spend a lot of time trying to do that. I > would be > interested in any suggestions. > Placed[.., Below|Bottom|Axis] should have worked. Please let support at wolfram.com know for tracking purposes. Brett Champion Wolfram Research
- References:
- Re: BarChart Range
- From: "David Park" <djmpark@comcast.net>
- Re: BarChart Range