# Bar Graph - Compress/Shorten some elements

I have a bar graph that I'm plotting. Some of the values are very large when compared to others. I want to put more focus on the smaller values, while still showing the larger elements.

The reason I want to do this is so that the resulting graph won't be unwieldy.

If I was drawing this by hand, I'd 'cut' the long bars and have a double-tilde in the middle of the element

So my question is either:

1. Can this be done in Mathematica?
2. If not, can anyone think of a better way of keeping the dimensions of my graph small, while still containing enough detail to show the smaller values?
• try Log your data. – Algohi Oct 10 '14 at 23:12

data = {50, 715, 579, 5, 96, 295, 1100, 7, 117, 17, 22, 8, 7, 561};

Framed@BarChart[data,
ChartLabels -> {Placed[data, Above]},
GridLines -> Automatic,
ImageSize -> 500,
Method -> {"GridLinesInFront" -> True},
ScalingFunctions -> "Log"]


data = {50, 715, 579, 12, 96, 295, 1100, 430, 117, 17, 22, 8, 7, 561};

Framed@BarChart[data,
BarOrigin -> Left,
BarSpacing -> 0.3,
ChartElementFunction ->
ChartElementDataFunction["SegmentScaleRectangle", "Segments" -> 6,
"ColorScheme" -> "BeachColors"],
ChartLabels -> {Placed[data, Right]},
ImageSize -> 500,
PlotTheme -> "Marketing",
ScalingFunctions -> "Log"]


• ScalingFunctions -> "Log" is exactly what I needed. It prevents me from Loging my data in advance which is what I was kind of trying to avoid – Arnon Oct 11 '14 at 10:32

This is a rough work around. I am sure someone will come up with better idea.

 data = RandomSample[
Join[RandomInteger[1000, 5], RandomInteger[10, 10]], 15];
BarChart[data]
Show[ListLogPlot[data, PlotStyle -> PointSize[0.0]],
BarChart[Log[data]]]


• That is a nice workaround indeed, but I think @eldo 's solution is a bit more straightforward for my use! – Arnon Oct 11 '14 at 10:31