I have this dataframe
dput(C_Em_2000_Lat_Am)
structure(list(V1 = structure(c(4L, 3L, 5L, 6L, 1L, 2L, 7L, 8L
), .Label = c("Crop Agriculture", "Mining", "Mixed Agriculture",
"Other land use", "Pasture", "Tree crops", "Urban", "Water"), class = "factor"),
V2 = structure(c(1L, 1L, 1L, 1L, 1L, 1L, 1L, 1L), .Label = "Emission Factor", class = "factor"),
V3 = c(97004.1719086906, 10899.1747511239, 938738.864637841,
11024.7872260286, 129805.568347205, 778.178352715695, 28603.3785457348,
24333.5577048119)), .Names = c("V1", "V2", "V3"), row.names = c(NA,
-8L), class = "data.frame")
I want to plot the percentage values of the column V3 which are currently absolute values. So far I have managed to plot the absolute values (see below) but also need to plot the percentage of each values (where total value = sum of values in column V3).
ggplot(C_Em_2000_Lat_Am, aes(x=V1, y = V3)) + geom_histogram(stat="identity", binwidth = 0.1)+
labs(x = "", y = "Carbon Emissions (T/year)") +
theme(axis.text=element_text(size=16),axis.title=element_text(size=20),
legend.title=element_text(size=20, face='bold'),legend.text=element_text(size=20), axis.line = element_line(colour = "black")) +
scale_fill_grey("grey50") + scale_y_continuous(limits=c(0,1000000))
Can someone help me out with that? Thanks