当前位置:网站首页>GGHIGHLIGHT: EASY WAY TO HIGHLIGHT A GGPLOT IN R
GGHIGHLIGHT: EASY WAY TO HIGHLIGHT A GGPLOT IN R
2022-07-02 11:50:00 【Xiaoyu 2022】
library(tidyverse)
library(gghighlight)
theme_set(theme_bw())
p <- ggplot(
airquality,
aes(Day, Temp, group = Month, color = factor(Month))
) +
geom_line() +
scale_color_viridis_d() +
labs(x = "Day of Month", y = "Temperature") +
theme(legend.position = "top")
p

library(tidyverse)
library(gghighlight)
theme_set(theme_bw())
p <- ggplot(
airquality,
aes(Day, Temp, group = Month, color = factor(Month))
) +
geom_line() +
scale_color_viridis_d() +
labs(x = "Day of Month", y = "Temperature") +
theme(legend.position = "top")
p + gghighlight(max(Temp) > 93, label_key = Month)

library(tidyverse)
library(gghighlight)
theme_set(theme_bw())
ggplot(iris, aes(Sepal.Length, fill = Species)) +
geom_histogram(bins = 30) +
scale_fill_viridis_d() +
gghighlight() +
facet_wrap(~ Species)

library(tidyverse)
library(gghighlight)
df <- mtcars %>% mutate(name = row.names(.))
df %>%
ggplot(aes(mpg, disp)) +
geom_point(col = "darkred") +
gghighlight(disp > 350 & disp <= 400,
unhighlighted_colour = alpha("steelblue", 0.4),
use_direct_label = TRUE,
label_key = name,
label_params = list(size = 5)) +
geom_point(col = "darkred", size = 2.5)

library(tidyverse)
library(gghighlight)
df <- mtcars %>% mutate(name = row.names(.))
ggplot(df, aes(name, mpg)) +
geom_col() +
theme(axis.text.x = element_text(angle = 45, hjust = 1)) +
gghighlight(mpg > 25)
边栏推荐
- Tidb DM alarm DM_ sync_ process_ exists_ with_ Error troubleshooting
- MySql存储过程游标遍历结果集
- A white hole formed by antineutrons produced by particle accelerators
- Writing contract test cases based on hardhat
- Webauthn - official development document
- Principe du contrat évolutif - delegatecall
- 预言机链上链下调研
- 2022年4月17日五心红娘团队收获双份喜报
- 抖音海外版TikTok:正与拜登政府敲定最终数据安全协议
- 基于 Openzeppelin 的可升级合约解决方案的注意事项
猜你喜欢

2022年4月17日五心红娘团队收获双份喜报

Beautiful and intelligent, Haval H6 supreme+ makes Yuanxiao travel safer

How to Easily Create Barplots with Error Bars in R

A white hole formed by antineutrons produced by particle accelerators

RPA进阶(二)Uipath应用实践

map集合赋值到数据库

HOW TO ADD P-VALUES TO GGPLOT FACETS

JS -- take a number randomly from the array every call, and it cannot be the same as the last time

基于Hardhat和Openzeppelin开发可升级合约(二)

亚马逊云科技 Community Builder 申请窗口开启
随机推荐
bedtools使用教程
How to Create a Nice Box and Whisker Plot in R
PX4 Position_ Control RC_ Remoter import
HOW TO ADD P-VALUES ONTO A GROUPED GGPLOT USING THE GGPUBR R PACKAGE
Three transparent LED displays that were "crowded" in 2022
YYGH-BUG-05
Always report errors when connecting to MySQL database
6. Introduce you to LED soft film screen. LED soft film screen size | price | installation | application
Tidb DM alarm DM_ sync_ process_ exists_ with_ Error troubleshooting
Pyqt5+opencv project practice: microcirculator pictures, video recording and manual comparison software (with source code)
What week is a date obtained by QT
Eight sorting summaries
Thesis translation: 2022_ PACDNN: A phase-aware composite deep neural network for speech enhancement
HOW TO ADD P-VALUES TO GGPLOT FACETS
进入前六!博云在中国云管理软件市场销量排行持续上升
通讯录的实现(文件版本)
Develop scalable contracts based on hardhat and openzeppelin (I)
R HISTOGRAM EXAMPLE QUICK REFERENCE
Writing contract test cases based on hardhat
基于 Openzeppelin 的可升级合约解决方案的注意事项
