当前位置:网站首页>GGHIGHLIGHT: EASY WAY TO HIGHLIGHT A GGPLOT IN R
GGHIGHLIGHT: EASY WAY TO HIGHLIGHT A GGPLOT IN R
2022-07-02 09:38:00 【小宇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)
边栏推荐
- CentOS8之mysql基本用法
- C#基于当前时间,获取唯一识别号(ID)的方法
- 基于Hardhat和Openzeppelin开发可升级合约(二)
- Mongodb learning and sorting (condition operator, $type operator, limit() method, skip() method and sort() method)
- 6方面带你认识LED软膜屏 LED软膜屏尺寸|价格|安装|应用
- From the perspective of attack surface, see the practice of zero trust scheme of Xinchuang
- PX4 Position_Control RC_Remoter引入
- ASTParser 解析含有emum 枚举方法的类文件的踩坑记
- Redis exceeds the maximum memory error oom command not allowed when used memory & gt; ' maxmemory'
- MTK full dump grab
猜你喜欢

ctf 记录

map集合赋值到数据库

Why does LabVIEW lose precision in floating point numbers

vant tabs组件选中第一个下划线位置异常

可升级合约的原理-DelegateCall

PowerBI中导出数据方法汇总

Iii. Système de démarrage et d'horloge à puce

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

TDSQL|就业难?腾讯云数据库微认证来帮你

tidb-dm报警DM_sync_process_exists_with_error排查
随机推荐
ESP32存储配网信息+LED显示配网状态+按键清除配网信息(附源码)
MTK full dump抓取
Is it safe to open a stock account through the QR code of the securities manager? Or is it safe to open an account in a securities company?
PX4 Position_Control RC_Remoter引入
Supermarket (heap overload
揭露数据不一致的利器 —— 实时核对系统
ros缺少catkin_pkg
Precautions for scalable contract solution based on openzeppelin
spritejs
SSRF
微信小程序利用百度api达成植物识别
C file and folder operation
String (Analog
VS2019代码中包含中文内容导致的编译错误和打印输出乱码问题
MySQL basic statement
由粒子加速器产生的反中子形成的白洞
A white hole formed by antineutrons produced by particle accelerators
TDSQL|就业难?腾讯云数据库微认证来帮你
亚马逊云科技 Community Builder 申请窗口开启
Importerror: impossible d'importer le nom « graph» de « graphviz»
