| Author |
Comment/Response |
yehuda
|
10/11/12 6:21pm
see if this can help you
I changed some of your programming style, it is not reasonable to set a new variable name for each value
It is recommended to start var names with a non capital letter
yehuda
*************************************************
oldNumbers = {20, 30, 40};
newNumbers = {1.2, 1.4, 1.6}*oldNumbers;
{sumOld, sumNew} = Total /@ {oldNumbers, newNumbers};
BarChart[{oldNumbers, newNumbers},
ChartLabels -> {Placed[{Text[Style[sumOld, 18]],
Text[Style[sumNew, 18]]}, Above],
Placed[Style[#, Bold, 12] & /@ {"NumberOne", "NumberTwo",
"NumberThree"}, Top]},
LabelingFunction -> (If[#2[[1]] == 1,
Placed[Style["\nValue", Bold, Red, 12], Center],
Placed[Style["\nNewValue", Bold, Red, 12], Center]] &),
ChartLayout -> "Stacked",
LabelStyle ->
Directive[Bold, FontFamily -> "Helvetica", FontSize -> 12]]
URL: , |
|