Guest User

Untitled

a guest
Jan 4th, 2018
112
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 1.27 KB | None | 0 0
  1. totals4 = {{1093, "AUSTRALIA"}, {235, "BELGIUM"}, {474, "BERMUDA"}, {187, "BRAZIL"}};
  2. BarChart[#, ChartStyle -> "Pastel",
  3. ChartLabels -> (Placed[Rotate[Style[#, Blue], Pi/3] & /@ #2, {{.5, 0}, {1, 1}}])
  4. ] & @@ Transpose[totals4]
  5.  
  6. BarChart[Range[4], ChartStyle -> "Pastel", ChartLabels ->
  7. MapIndexed[Style[#1, ColorData["Pastel", Rescale[#2[[1]], {1, 4}]], Bold, 16] &,
  8. CharacterRange["A", "D"]]]
  9.  
  10. Style[obj_, {GrayLevel[0]}] :> obj
  11.  
  12. totals4 = {{1093, "AUSTRALIA"}, {235, "BELGIUM"}, {474, "BERMUDA"}, {187, "BRAZIL"}};
  13.  
  14. BarChart[#, ChartStyle -> "Pastel",
  15. ChartLabels -> (Placed[Rotate[#, Pi/3] & /@ #2, {{.5, 0}, {1, 1}}])] & @@
  16. Transpose[totals4] /. Style[obj_, {GrayLevel[0]}] :> obj
  17.  
  18. Text[Style[obj_, {GrayLevel[0]}], pos__] :> Text[obj, pos]
  19.  
  20. ClearAll[ceFX]
  21. ceFX[cedf_: "Rectangle", style_: (FontSize -> Scaled[.04])] :=
  22. ({ChartElementData[cedf][##],
  23. Text[Style[#3[[1]], style], Offset[{0, -2}, {Mean[#[[1]]], 0}], {0, 1}, {1, 0}]} &)
  24.  
  25. BarChart[# -> #2 & @@@ totals4, ChartStyle -> "Rainbow", ChartElementFunction -> ceFX[]]
  26.  
  27. BarChart[# -> #2 & @@@ totals4, ChartStyle -> "DarkRainbow",
  28. ChartElementFunction -> ceFX["GlassRectangle", Directive[Bold, Italic, FontSize -> 20,
  29. FontFamily -> "Segoe Script"]]]
Add Comment
Please, Sign In to add comment