Y轴截断图by ggprism
Y轴截断图by ggprism
介绍
- ggplot2绘制Y轴截断图by ggprism
加载R包
knitr::opts_chunk$set(message = FALSE, warning = FALSE)library(tidyverse)
library(ggprism)
library(patchwork)rm(list = ls())
options(stringsAsFactors = F)
options(future.globals.maxSize = 10000 * 1024^2)
Importing data
tg <- ToothGrowth
tg[2, "len"] <- tg[2, "len"] * 100head(tg)
原始图
ggplot(tg, aes(x = factor(dose), y = len)) + geom_jitter(aes(shape = factor(dose)), width = 0.2, size = 2) + scale_shape_prism() +