In the data there are on rows where hwy <= 10
. For demonstration purposes let's remove rows where hwy <= 15
. You can remove the rows from the data of the plot.
plt<- ggplot(mpg, aes(class, hwy)) + geom_boxplot(outlier.shape = NA) + geom_jitter(width = 0.2)
plt$data <- subset(plt$data, hwy > 15)
plt
I would filter the data frame, like so:
ggplot(mpg %>% filter(hwy >= 10), aes(class, hwy)) + geom_boxplot(outlier.shape = NA) + geom_jitter(width = 0.2)
The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.