Re: BarChart inside a Frame. How to remove Labels from the top of
- To: mathgroup at smc.vnet.net
- Subject: [mg80599] Re: BarChart inside a Frame. How to remove Labels from the top of
- From: Jean-Marc Gulliet <jeanmarc.gulliet at gmail.com>
- Date: Sun, 26 Aug 2007 23:10:07 -0400 (EDT)
- Organization: The Open University, Milton Keynes, UK
- References: <fardqs$b5c$1@smc.vnet.net>
Nasser Abbasi wrote: > Mathematica 6.0.1 > > This is really annoying. I wanted a BarChart inside a frame. All works ok, > except it insists on putting the bar labels on top of the frame as well as > on the bottom of the frame, like this: > > BarChart[{1, 2, 3}, Frame -> True] > > I can remove the labels altogether, and use FrameTicks, but it still does it > again ! > > BarChart[{1, 2, 3}, Frame -> > True,BarLabels->None,FrameTicks->{{1,2,3},{0,1}}] > > I think BarChart conflict with Frame somehow. > > The only reason I wanted to put the BarChart inside a frame, is that with a > frame, when I put the x-label, it will go below and not on the side. > > I wanted to write a large x-label, and just using BarChart, the x-label was > extending too far to the right since it start at the right edge of the axis, > as you see from this example > > BarChart[{1, 2, 3}, AxesLabel -> {"x-axis label"}] > > Is there a way to solve this problem? Either just use BarChart without > Frame, but tell it to put the x-label BELOW, or use a Frame with BarChart > but not have the bar labels at top and bottom as well? Hi Nasser, Although this does not explain the weird behavior your reported, the following expression should be close to what you are looking for. (The trick is to explicitly tell Mathematica not to add any tick on the upper and right frames.) Needs["BarCharts`"] BarChart[{1, 2, 3}, Frame -> True, BarLabels -> None, FrameTicks -> {{1, 2, 3}, {0, 1}, None, None}] HTH, -- Jean-Marc