R绘图体系ggplot2 基础篇 点 线 面

1.ggplot 点 形状

25 字点型 用于 geom_point()和geom_jitter()

2.ggplot 线型

13种线型 用于 geom_vline()、geom_hline() 和 geom_abline()
image

# plot linetype
library(ggplot2)
g <- scales::linetype_pal()(13)
group <- factor(rep(g, each=1), levels=g)
y <- c(1:13)
x <- rep(1:13,each = 13)
d <- data.frame(group, x,y,stringsAsFactors=FALSE)
ggplot(d, aes(x, y, color=group, linetype=group)) +
geom_line(size = 1) + scale_color_ordinal() +
theme_classic() +
ylab(label = "") +
xlab(label = "") +
scale_y_continuous(breaks=seq(0,13,1))

3.ggplot 面

待续 ...

posted @ 2020-09-23 21:51  真小兽医  阅读(553)  评论(0编辑  收藏  举报