CommencerCommencer gratuitement

Use of color in scatter plots

We often use the hue of color in a scatter plot to represent categories of a categorical variable. Let's add Gender to our scatter plots.

Cet exercice fait partie du cours

Analyzing Survey Data in R

Afficher le cours

Exercice interactif pratique

Essayez cet exercice en complétant cet exemple de code.

# Add gender to plot
ggplot(data = NHANES20,
       mapping = aes(___)) + 
	geom_point(___) + 
    guides(___ = "none")
Modifier et exécuter le code