I created a barplot using ggplot in which the x-axis represents a number in acending order and each number has is own percentage. I would like to normalized the observed barplot (Gaussian) in order to compare the two barplots. someone know how to do it? Here is my code:
lemon_imp_05 = subset(Lemon_brevante_data,Lemon_brevante_data$Block == "IMP-05")
S = lemon_imp_05$percentage
names(S) = lemon_imp_05$count
barplot(S, main = 'Block IMP-05 Loam',
xlab= 'Count(N.fruits/carton)',ylab = 'percentage(%)', col = "green")
The result is a non normal distribution bar plot, but I want to force a normal distribution on the observed barplot (don't know how to add picture of the current result). any suggestions? Thanks
barplot(S / sum(S), ...)
. Though this would be a sum-to-one normalization, not a Gaussian normalization. You could usescale(S)
instead if you want to center and scale the vector. If you edit your question, in the edit bar there's an "add image" button. – Gregor Thomasdput(S[1:10])
for the first 10 values would be great - it will be copy/pasteable and include all structure and class information. – Gregor Thomas