I try to change the order of the histogram bars manually, but just can't make it happen. Could someone help me out?
I want to make the bars with the following first numbers to be placed next to each other: 1-8-12, 2-7-11, 3-6-10 and 4-5-9.
I also try to change the colors to another palette, without success. I'd appreciate if someone could help out with the right code for this.
dsv <- read.csv("mydata.csv",sep=";",dec=",",header=TRUE,row.names=1)
dsv$Diatomeer <- NULL
tdsv <- t(dsv)
pdsv <- prop.table(as.matrix(tdsv),margin=2)
sum(pdsv)
tpdsv <- pdsv*100
plotdsv <- melt(tpdsv)
head(plotdsv)
colnames(plotdsv) <- c("Art","Basseng","value")
ggplot(plotdsv,aes(x=Basseng,y=value,ymin=0,ymax=value,fill=Art))+
geom_bar(stat="identity")+
theme(axis.text.x=element_text(angle=90))
scale_x_discrete (limits = ...)
– Bg1850scale_fill_gradient
– Bg1850