Тёмный

Highlight subset of data in a plot using ggplot2 

Rajendra Choure
Подписаться 8 тыс.
Просмотров 521
50% 1

#rprogramming #datavisualization #ggplot2 #highlight #subset
In this video, I have demonstrated the use of function subset() inside geom to get a subset of the data highlighted in te plot. Rearrangement of the layers also has been discussed with adjustments to alpha to make the highlighting effective.
the code
library(palmerpenguins)
head(penguins)
summary(penguins)
library(ggplot2)
ggplot(penguins,aes(flipper_length_mm,body_mass_g,color=species))+
geom_point(data=subset(penguins,island=="Biscoe"), color="red",size=3)+
geom_point()+
theme_classic()
subset(penguins,island=="Biscoe")
Facebook page:
/ rajendrachoureisc
Mail Id:
rajuchoure@gmail.com
youtube playlist:
• R programming tutorials

Опубликовано:

 

16 сен 2024

Поделиться:

Ссылка:

Скачать:

Готовим ссылку...

Добавить в:

Мой плейлист
Посмотреть позже
Комментарии    
Далее
Advanced ggplot    (episode #1)
13:44
Просмотров 15 тыс.
Visualizations of Qualitative Variables
23:57
Create Professional Report using R and R Studio
6:53
AI can't cross this line and we don't know why.
24:07
Просмотров 449 тыс.
Time Series Forecasting Example in RStudio
37:53
Просмотров 142 тыс.
R tutorial: Creating Maps and mapping data with ggplot2
10:30