Re: [R] colors in facet ggplot and geom_bar

2016-02-25 Thread efisio solazzo
27;any hint' is that err_type should be a factor with levels in your > desired order, and you can then use any of the scale_fill_* functions > including scale_colour_manual to specify the colors in the same order > as the levels in the factor. > -- > Sent from my phone. Plea

[R] colors in facet ggplot and geom_bar

2016-02-22 Thread efisio solazzo
;)+ theme(axis.text.x = element_text(angle = 90, vjust = 0.5, hjust=1.))+ theme(axis.title.x = element_blank())+ ylab(units) + geom_text ( aes(label=sign.value, y=pos)) + where err_type = c('bias', mMSe', 'var') thanks fo

[R] annotating faceted ggplot

2015-10-23 Thread efisio solazzo
Dear, I have been reading several posts but still cannot work out how to annotate a faceted boxplot created from existing statistics using ggplot. the dataframe is smthing like: dep_stat specie.sp. models min max q25q50 q75 1NO2 mod1 0 225.0 0.1 0.401.30

Re: [R] looping multipanel plots to different figures

2015-02-19 Thread efisio solazzo
f so, > > plot_filenames<-c("plot1.png","plot2.png","plot3.png") > for(plotfn in plot_filenames) { > png(plotfn) > par(mfrow=c(1,2)) > hist(sample(1:5,30,TRUE)) > hist(sample(1:5,30,TRUE)) > dev.off() > } > > Jim >

[R] looping multipanel plots to different figures

2015-02-19 Thread efisio solazzo
Dear, cannot find a way to direct multipanel plots to different figures (files) while within a loop. Say, the loop creates two plots each step: one plot should go to figure 1 and the other to figure 2. Same for the next steps of the loop: the plots should go to figure 1 and figure 2 in a m