Hello,
I am rephrasing my question regarding scales = "free_y", which I had posted earlier. Could any one please tell me what is wrong with my code below? In my plot, I would like to have the y-axis that would vary depending on the range of the y-values in different facets.
I would appreciate receiving any tips you may provide to make the code work.
Thanks,
Pradip Muhuri
##########
p <- ggplot(dat, aes(x=Model, y=Est, ymin=LCI, ymax=UCI))+
geom_pointrange(linetype = 1,size=1.0, colour = "navyblue")+
geom_hline(aes(yintercept=1), size=1.0, colour="red", lty=2) +
facet_wrap(~ age, nrow=1, scales="free_y")+
coord_flip()+
ylim(0,6 )+
scale_fill_grey()+ theme_bw()+
xlab (" ")+
ylab("Hazards Ratio ")+
theme(text = element_text(size = 20, face = "bold"),
axis.text.x = element_text(vjust = 0, colour="black"),
axis.text.y = element_text(hjust = 1, colour="black"),
axis.title.y = element_text(size = rel(0.4), colour="black"),
axis.title.x = element_text( face = "plain"),
legend.text = element_text(size = rel(0.8), hjust = 0),
legend.position = ("none"))
print(p)
ggsave(file='c11_forest_plots_hr.png', width=11, height=7)
--
You received this message because you are subscribed to the ggplot2 mailing list.
Please provide a reproducible example:
https://github.com/hadley/devtools/wiki/Reproducibility
To post: email
ggp...@googlegroups.com
To unsubscribe: email
ggplot2+u...@googlegroups.com
More options:
http://groups.google.com/group/ggplot2