Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- dat = <|0 -> <|2007 -> 7, 2008 -> 8, 2009 -> 9, 2010 -> 10|>,
- 1 -> <|2007 -> 5, 2008 -> 6, 2009 -> 7, 2010 -> 8|>|>;
- BarChart[dat,
- ChartLabels -> {Automatic, None},
- ChartLayout -> "Stacked",
- ChartLegends -> Automatic,
- ColorFunction -> ColorData["DeepSeaColors"]]
- Unprotect[ColorData];
- ColorData["x"] = ColorData[{"DeepSeaColors", "Reverse"}];
- BarChart[dat, ChartLabels -> {Automatic, None},
- ChartLayout -> "Stacked", ChartLegends -> Automatic,
- ChartStyle -> "x"]
- colors = ColorData[{"DeepSeaColors", "Reverse"}] /@ Subdivide[3];
- BarChart[dat, ChartLabels -> {Automatic, None},
- ChartLayout -> "Stacked", ChartLegends -> Automatic,
- ChartStyle -> colors]
- Legended[
- PieChart[{mix, males, females},
- ColorFunction -> (Switch[#, mix, LightGreen, males, LightBlue,
- females, LightPink] &),
- ColorFunctionScaling -> False
- (*,ChartLegends[Rule]{"mixed gender","male gender",
- "female gender"} BUG*)
- ]
- ,
- [{LightGreen, LightBlue, LightPink},
- {"Mix", "Male", "Female"}
- ]
- ]
Add Comment
Please, Sign In to add comment