Guest User

Untitled

a guest
Mar 23rd, 2018
79
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.93 KB | None | 0 0
  1. data = {{3, 2}, {6, 3}, {8, 10}, {9, 9},
  2. {3, 1}, {5, 2}, {6, 4}, {7, 8},
  3. {4, 1}, {7, 2}, {9, 0}, {10, 12}};
  4.  
  5. bc = BarChart[data, BarSpacing -> {0, 1}, PerformanceGoal -> "Speed",
  6. ChartStyle -> {LightOrange, LightGreen}, ImageSize -> 900, AspectRatio -> 0.4,
  7. ChartLabels -> {Flatten@ConstantArray[{"Mar", "Jun", "Sep", "Dec"}, 3], None},
  8. ImagePadding -> 8, PlotRangePadding -> {Automatic, {2, Automatic}}];
  9.  
  10. labels = MapThread[Inset[Style[#1, Bold, 16], {#2, -1.8}, {Center, Bottom}] &,
  11. {{"2015", "2016", "2017"}, {6.5, 18.5, 30.5}}];
  12.  
  13. selopts = {AspectRatio, Axes, AxesOrigin, ImageSize, PlotRangePadding};
  14. opts0 = selopts /. bc[[2]];
  15. opts = Thread[selopts -> opts0];
  16. Graphics[bc[[1]], opts, Epilog -> Append[labels,
  17. Inset[SwatchLegend[{LightOrange, LightGreen}, Style[#, 12] & /@ {"Masha", "Bear"},
  18. LegendMarkerSize -> 20, LegendFunction -> (Framed[#, RoundingRadius -> 4,
  19. FrameStyle -> Gray] &)], {28, 10.5}]]]
Add Comment
Please, Sign In to add comment