Mathematica 9 is now available
Student Support Forum
-----
Student Support Forum: 'Barchart' topicStudent Support Forum > General > "Barchart"

< Previous Comment | Next Comment >Help | Reply To Comment | Reply To Topic
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: ,

Subject (listing for 'Barchart')
Author Date Posted
Barchart mathematica ... 10/08/12 1:06pm
Re: Barchart yehuda 10/11/12 6:21pm
Re: Barchart mathematica ... 10/12/12 4:18pm
Re: Re: Barchart yehuda 10/14/12 6:25pm
Re: Re: Re: Barchart mathematica ... 10/17/12 4:05pm
< Previous Comment | Next Comment >Help | Reply To Comment | Reply To Topic