Today:
- Scatterplot AKA bivariate plot
- Linegraph
- Boxplot
- Histogram
- Barplot AKA barchart AKA bargraph
Mon Oct 10, 2016
Today:
Say we have the following piecharts represent the polling from a local election with five candidates (1-5) at three different time points A, B, an C:
Answer the following questions:
x
aesthetic.geom_bar()
is the trickiest of the 5NG in ggplot2
, hence me presenting it lastRecall from Lec05 Slide 16, we displayed
There are two different ways to input the data:
Counts are not pre-computed:
Row Number | name |
---|---|
1 | Albert |
2 | Albert |
3 | Albert |
4 | Virginia |
5 | Virginia |
Counts are pre-computed in variable n
. So n
becomes a y
aesthetic variable!
name | n |
---|---|
Albert | 3 |
Virginia | 2 |