Given that I have two data frames, how can I plot this. I understand i can reverse the y scale but unable to get the right plot this way.
#Create dataframe 1
patientA <- c("treatment1", "treatment2", "treatment3", "treatment4", "treatment5", "treatment6", "treatment7")
x1.value <- as.numeric(c(1, 34, 48, 24, 10, 9, 18))
df.1 <- data.frame(patientA, x1.value)
#Create dataframe 2
patientB <- c("treatment1", "treatment2", "treatment3", "treatment4", "treatment5", "treatment6", "treatment7")
x2.value <- as.numeric(c(1, 34, 48, 24, 10, 9, 18))
df.2 <- data.frame(patientA, x2.value)
My current scripts, use the following method
bp_1 <- ggplot(new.df.1, aes(x=Treatment ,y=Number,fill=substring(Factors,1)))+
geom_histogram(stat="identity",position="dodge") + scale_y_continuous(labels = scales::comma)
bp_2 <- ggplot(new.df.2, aes(x=Treatment ,y=Number,fill=substring(Factors,1)))+
geom_histogram(stat="identity",position="dodge") + scale_y_continuous(labels = scales::comma)
But i can do one individual plots herein. A desired image is show below. Any help is much appreciated.