library(gapminder)
gapminder <- as.data.frame(gapminder)
gapminder %>%
ggplot(aes(x=continent,y=lifeExp, fill=continent)) +
geom_boxplot() + geom_jitter(width=0.1,alpha=0.2)
Using the above code from a ggplot tutorial found online, I obtain a df using data from the gapminder
package. It looks like this :
and the resulting plot works too :
How can I plot only the continents Africa and Asia ?