So i have a dictionary with data(fruits in a basket):
dict = {'apple' : '12', 'orange' : '9', 'banana' : '9', 'kiwi' :'3'}
now i need to plot a percentage bar graph that can represent the percentage of that particular fruit among total fruits in the basket.
Since we have a total of 12 + 9 + 9 + 4 = 33 so we have :
apple = 12/33 = 0.36 , orange = 9/33 = 0.27 , banana = 9/33 = 0.27 , kiwi = 3/33 = 0.09 ,
so consider a percent bar plot where the x axis is a categorical data of fruits and the y axis is the percentage in composition.