当前位置:网站首页>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)
边栏推荐
- Develop scalable contracts based on hardhat and openzeppelin (II)
- 通过券商经理的开户二维码开股票账户安全吗?还是去证券公司开户安全?
- Importerror: impossible d'importer le nom « graph» de « graphviz»
- Skills of PLC recorder in quickly monitoring multiple PLC bits
- Win11 arm system configuration Net core environment variable
- TIPC Cluster5
- I STM32 development environment, keil5/mdk5.14 installation tutorial (with download link)
- spritejs
- 原生方法合并word
- PHP tea sales and shopping online store
猜你喜欢
Mongodb learning and sorting (condition operator, $type operator, limit() method, skip() method and sort() method)
III Chip startup and clock system
RPA进阶(二)Uipath应用实践
From the perspective of attack surface, see the practice of zero trust scheme of Xinchuang
MySQL comparison operator in problem solving
Iii. Système de démarrage et d'horloge à puce
从攻击面视角,看信创零信任方案实践
CTF record
On April 17, 2022, the five heart matchmaker team received double good news
TDSQL|就业难?腾讯云数据库微认证来帮你
随机推荐
MySql存储过程游标遍历结果集
基于 Openzeppelin 的可升级合约解决方案的注意事项
Is the Ren domain name valuable? Is it worth investing? What is the application scope of Ren domain name?
Internship report skywalking distributed link tracking?
Liftover for genome coordinate conversion
Solve the problem of data blank in the quick sliding page of the uniapp list
mysql链表数据存储查询排序问题
webauthn——官方开发文档
亚马逊云科技 Community Builder 申请窗口开启
SSRF
制造业数字化转型和精益生产什么关系
可升级合约的原理-DelegateCall
Array splitting (regular thinking
Map set assignment to database
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?
ctf 记录
MySQL basic statement
ImportError: cannot import name ‘Digraph‘ from ‘graphviz‘
TIPC addressing 2
Never forget, there will be echoes | hanging mirror sincerely invites you to participate in the opensca user award research