11.7. line的type参数 ggplot()+ geom_line(aes(x=1:2, y=c(1,1)), linetype=0, linewidth=1)+ geom_line(aes(x=1:2, y=c(2,2)), linetype=1, linewidth=1)+ geom_line(aes(x=1:2, y=c(3,3)), linetype=2, linewidth=1)+ geom_line(aes(x=1:2, y=c(4,4)), linetype=3...
linetype=group))+geom_point(size=2)+geom_line(size=1)p1
这三类主题元素函数将所有的ggplot2图形主题元素全部都抽象进去了,而且做了严格的子孙继承关系链与权限控制范围。 从text、rect、line这三个全局主题元素到之后的各个主题模块的各类text、rect、line及其衍生主题,都遵循这种子孙继承关系。 比如你制定了text = element_text(family= ,size = ,angle = , colour = )...
geom_point(shape=8,fill="blue", size=1.5) + geom_line() + geom_point(aes(x=Date, y = F,color="F"),shape=24,size=1.5) + geom_line() + geom_ribbon(aes(x = Date, y = F,ymax = L95,ymin = H95,color="B"), fill = "gray95", alpha = 0.6, linetype=6, show.legend ...
enviroPCA_plot <- ggplot(enviroPCA_sites, aes(x = PC1, y = PC2)) + geom_hline(yintercept = 0, linetype = "dotted") + geom_vline(xintercept = 0, linetype = "dotted") + geom_line(aes(group = city), alpha = 0.7) + geom_point(size = 2.75, shape = 21, colour = "black...
geom_vline(xintercept = 0, linetype = "dotted") + geom_line(aes(group = city), alpha = 0.7) + geom_point(size = 2.75, shape = 21, colour = "black", aes(fill = habitat)) + stat_ellipse(aes(colour = habitat), size = 1.5, ...
geom_line(color = "red", linetype = "dotted", size = .5) 1. 2. 设置一个内置主题,通过theme图层可以控制图片的主题,个人认为bw主题比较美观、简洁大方。 theme_set(theme_bw()) g + geom_point(color = "red") 1. 2. 调整坐标轴相关信息 ...
size = 0.6, linetype = "dotted", colour = "black") + geom_segment(aes(x = -0.0024, y = 0, xend = -0.0024, yend = -4.958), size = 0.6, linetype = "dotted", colour = "black") + geom_segment(aes(x = -3.75E-03, y = 0, xend = -3.75E-03, yend = -4.6011), ...
线(line,vline,abline,hline,stat_function等):一般是基于函数来处理位置 射(segment):特征是指定位置有xend和yend,表示射线方向 面(tile, rect):这类一般有xmax,xmin,ymax,ymin指定位置 棒(boxplot,bin,bar,histogram):往往是二维或一维变量,具有width属性 ...
## lineend = "butt"), rect = element_rect(fill = "white", ## colour = "black", size = 0.5, linetype = 1), text = element_text(family = base_family, ## face = "plain", colour = "black", size = base_size, hjust = 0.5, ...