Scatterplots in R with geom_point() and geom_text/label()

preview_player
Показать описание
In this tutorial I show you how to create and label scatterplots in R with geom_point(), geom_text/label() and ggplot().

I will explain the different function arguments, how you can map the color or shape to certain variables of your data frame and how to configure text you might want to add to the points.
In the end I show you how you can quickly turn a scatterplot interactive with hover-over functionality.

⏱ Time Stamps ⌚
0:00 - Intro
0:26 - geom_point with iris
1:50 - alpha and shapes
5:25 - coloring
9:02 - size and stroke
10:36 - marginal distribution
12:51 - geom_text/label
13:36 - text alignment
15:27 - font and color options
17:50 - ggrepel
18:45 - plotly interactive

External Links:

Background Music:

Outro Animation:
AA-VFX Motion Backgrounds
Рекомендации по теме
Комментарии
Автор

You can download the R code from this video here in my free skool community:

TheDataDigest
Автор

Amazing in depth tutorial, best I've seen on the subject by a long shot

jackdaws
Автор

Keep the sentence /function meaningful with using the pipe %>%
users (python, etc) can easily understand your code

WahranRai
Автор

Hi thank you for this! Can you explain the difference between ggplot and ggplot2?

milicaradakovic
Автор

Hi, thanks for the video, it is quite helpful. However, I am stuck on the more than 6 shapes, I am working on 9 species and I am struggling with plotting the shapes for the other three. Your help would be highly appreciated.

ditiromoloto
Автор

How would you add a regession line on this type of scatterplot?

ldtrdl
Автор

What if the R version doesn't have ggplot package. Is there any substitute package??

nehanaaz
Автор

What do I do if I want to assign shapes to more than 6? how do I assign them individually?

lucy
Автор

Can you save the plot as html or whatever and keep it interactive?

hassanhijazi