[Scilab-users] How to add numbers beside stacked bar chart
Samuel Enibe
samuel.enibe at unn.edu.ng
Fri Sep 28 11:22:49 CEST 2012
Dear Sir,
I would like to add data (such as percentage of total for each bar) to bar
charts plotted with data such as shown in the attached SCILAB file. The
contents of the file is also reproduced below.
Kindly suggest the command I should use.
God bless you.
Samuel Ogbonna Enibe
Department of Mechanical Engineering
University of Nigeria, Nsukka, Nigeria
//////////////// CONTENTS OF SCILAB file /////////////////////////
year = [2000 2010 2020 2030];//years for the data
data = [8.18 21.54 49.68 62.56;//data for industry
10.61 15.73 24.56 39.45;//data for Transport
15.61 16.17 18.45 24.84;//data for Household
1.72 2.3 3.13 4.28//data for services
];
data2 = data';//transpose of data
sectors = ["Industry" "Transport" "Household" "Services"];
bar(year,data2,"stacked");
xtitle("","","Energy Demand,mtoe");
legend(sectors,"in_upper_left");
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://lists.scilab.org/pipermail/users/attachments/20120928/bd8c0e9d/attachment.htm>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: energy-iloeje-2012-test.sce
Type: application/octet-stream
Size: 453 bytes
Desc: not available
URL: <https://lists.scilab.org/pipermail/users/attachments/20120928/bd8c0e9d/attachment.obj>
More information about the users
mailing list