R绘图体系ggplot2 基础篇 点 线 面 1.ggplot 点 形状 2.ggplot 线型 3.ggplot 面

25 字点型 用于 geom_point()和geom_jitter()
R绘图体系ggplot2 基础篇 点 线 面
1.ggplot 点 形状
2.ggplot 线型
3.ggplot 面

2.ggplot 线型

13种线型 用于 geom_vline()、geom_hline() 和 geom_abline()
R绘图体系ggplot2 基础篇 点 线 面
1.ggplot 点 形状
2.ggplot 线型
3.ggplot 面

# 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 面

待续 ...