# Beginner's question: Gap between FrameLabel and BarChart

I have a BarChart (Mathematica 9.0.1)

BarChart[{1, 2, 3},
ChartLabels -> (Rotate[Text[Style[#, FontSize -> Scaled[0.05]]], -Pi/2]
& /@{abcdabcd,abcdabcd, abcdabcd})]


and would like to add a vertical label to the y-axis. I tried

BarChart[{1, 2, 3},
ChartLabels -> (Rotate[Text[Style[#, FontSize -> Scaled[0.05]]], -Pi/2]
& /@ {abcdabcd, abcdabcd, abcdabcd}),
FrameLabel -> {None, "y-axis"},
Frame -> {False, True, False, False}]


and it's perfect except for a gap between the two axes (which is somehow extremely ugly with the actual data):

I tried using Labeled, but then the label is positioned too low (i want it at the center of the y-axis):

Labeled[BarChart[{1, 2, 3},
ChartLabels -> (Rotate[Text[Style[#, FontSize -> Scaled[0.05]]], -Pi/2]
& /@ {abcdabcd, abcdabcd, abcdabcd})],
{Rotate[Style["y-axis", FontFamily -> "Helvetica"], Pi/2]}, {Left}]


Any help would be most appreciated!

-
Welcome, Stefan. I embedded the images for you. The image/link limitation is an anti-spam measure that will be lifted once you start using the site more. –  Mr.Wizard May 18 '13 at 14:07
@Silvia: If I try that, the gap is gone, but so is the label ('y-axis'). –  Stefan Ca May 18 '13 at 17:24
Oops, you're right. Sorry for my oversight.. –  Silvia May 18 '13 at 17:42

In your second attempt (which results in the gap), you can remove the gap by eliminating the PlotRangePadding for the x-axis.

PlotRangePadding -> {0, 0}

-
You're right, that's even a bit simpler than Mr. Wizards solution. –  Stefan Ca May 18 '13 at 17:28
@Stefan For what it's worth the output (from this) looks a bit different on version 7, and the longer code was required to match your output. Also, I believe you should be able to use the slightly shorter PlotRangePadding -> 0 to produce the same output as given by PlotRangePadding -> {0, 0}. –  Mr.Wizard May 19 '13 at 5:52

This feels a lot more complicated than it should be, but I think at least it works:

BarChart[{1, 2, 3},
ChartLabels ->
(Rotate[Text[Style[#, FontSize -> Scaled[0.05]]], -Pi/2] & /@ {abcdabcd, abcdabcd, abcdabcd}),
FrameLabel -> {None, "y-axis"},
Frame -> {1, 1, 0, 0},
FrameTicks -> {None, All},