当前位置:网站首页>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)
边栏推荐
- Writing contract test cases based on hardhat
- MySQL basic statement
- flutter 问题总结
- [multithreading] the main thread waits for the sub thread to finish executing, and records the way to execute and obtain the execution result (with annotated code and no pit)
- Precautions for scalable contract solution based on openzeppelin
- CMake交叉编译
- 多文件程序X32dbg动态调试
- Principe du contrat évolutif - delegatecall
- 微信小程序利用百度api达成植物识别
- 揭露数据不一致的利器 —— 实时核对系统
猜你喜欢

数据分析 - matplotlib示例代码

HOW TO CREATE A BEAUTIFUL INTERACTIVE HEATMAP IN R

Thesis translation: 2022_ PACDNN: A phase-aware composite deep neural network for speech enhancement

Dynamic memory (advanced 4)

BEAUTIFUL GGPLOT VENN DIAGRAM WITH R

K-Means Clustering Visualization in R: Step By Step Guide

电脑无缘无故黑屏,无法调节亮度。

Research on and off the Oracle chain

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

揭露数据不一致的利器 —— 实时核对系统
随机推荐
map集合赋值到数据库
RPA advanced (II) uipath application practice
基于Hardhat和Openzeppelin开发可升级合约(一)
to_bytes与from_bytes简单示例
Three transparent LED displays that were "crowded" in 2022
PYQT5+openCV项目实战:微循环仪图片、视频记录和人工对比软件(附源码)
PX4 Position_Control RC_Remoter引入
The position of the first underline selected by the vant tabs component is abnormal
Data analysis - Matplotlib sample code
HOW TO CREATE A BEAUTIFUL INTERACTIVE HEATMAP IN R
deepTools对ChIP-seq数据可视化
GGPLOT: HOW TO DISPLAY THE LAST VALUE OF EACH LINE AS LABEL
[idea] use the plug-in to reverse generate code with one click
qt 仪表自定义控件
基于 Openzeppelin 的可升级合约解决方案的注意事项
The computer screen is black for no reason, and the brightness cannot be adjusted.
Power Spectral Density Estimates Using FFT---MATLAB
Esp32 stores the distribution network information +led displays the distribution network status + press the key to clear the distribution network information (source code attached)
微信小程序利用百度api达成植物识别
Astparser parsing class files with enum enumeration methods
