value),width=0.2,cex=0.8)+ scale_fill_manual(values = c('#84a354','#b15053','#cf9a2c','#7d7c7f'))+ theme_test(base_size = 15)+ labs(x=NULL,y='NO.of BGCs/genome')+ scale_y_continuous(limits = c(0,25))+ theme(legend.title = element_blank(), axis.title...
dset01_df <- dplyr::rename(dset01_df,long = x,lat=y) dset01_df_nona <- dset01_df %...
p+theme(legend.position = "top") 移除图例 p+theme(legend.position = "none") 修改图例标题以及标签外观 p+theme( legend.title =element_text(color="blue"), legend.text = element_text(color="red") ) 修改图例背景 p+theme(legend.background = element_rect(fill="lightblue")) 利用scale()函数...
="" col){="" ="" c(mean="mean(x[[col]]," na.rm="TRUE)," ="" ="" sd="sd(x[[col]]," na.rm="TRUE))" }=""><-ddply(data, grps,="" .fun="summary_func," varname)="" data_sum=""><- rename(data_sum,="" c('mean'="varname))">...
# Remove title for all legends bp + theme(legend.title=element_blank()) 修改图例中的标签 两种方法一种是直接修改标签, 另一种是修改data.frame Using scales 图例可以根据 fill, colour, linetype, shape 等绘制, 我们以 fill 为例, scale_fill_xxx, xxx 表示处理数据的一种方法, 可以是 hue(对颜色...
pal(11,"RdBu"))+ scale_size_manual(values = c(0.5, 1, 2)) + scale_colour_manual(values =c("#D95F02","#1B9E77","#A2A2A288")) + guides(size = guide_legend(title = "Mantel's r",override.aes = list(colour = "grey35"), order = 2), colour = guide_legend(title = "...
datac <- rename(datac, c("mean" = measurevar)) datac$se <- datac$sd / sqrt(datac$N) # Calculate standard error of the mean # Confidence interval multiplier for standard error # Calculate t-statistic for confidence interval: # e.g., if conf.interval is .95, use .975 (above/bel...
data_summary <- function(data, varname, grps){ require(plyr) summary_func <- function(x, col){ c(mean = mean(x[[col]], na.rm=TRUE), sd = sd(x[[col]], na.rm=TRUE)) } data_sum<-ddply(data, grps, .fun=summary_func, varname) data_sum <- rename(data_sum, c("mean" =...
data_summary <- function(data, varname, grps){ require(plyr) summary_func <- function(x, col){ c(mean = mean(x[[col]], na.rm=TRUE), sd = sd(x[[col]], na.rm=TRUE)) } data_sum<-ddply(data, grps, .fun=summary_func, varname) data_sum <- rename(data_sum, c("mean" =...
group_by(tax$Phylum) %>% # 使用tax中的门水平进行分类summarise_all(sum) %>% rename(Phylum...