commit
2aa6f300db
|
@ -358,7 +358,7 @@ ggplot(data = diamonds) +
|
||||||
geom_bar(mapping = aes(x = cut, fill = cut))
|
geom_bar(mapping = aes(x = cut, fill = cut))
|
||||||
```
|
```
|
||||||
|
|
||||||
If you map the fill aesthetic to a third variable, like `clarity`, you get a stacked bar chart. Each colored rectangle represents a combination of `cut` and `clarity`.
|
If you map the fill aesthetic to another variable, like `clarity`, you get a stacked bar chart. Each colored rectangle represents a combination of `cut` and `clarity`.
|
||||||
|
|
||||||
```{r}
|
```{r}
|
||||||
ggplot(data = diamonds) +
|
ggplot(data = diamonds) +
|
||||||
|
|
Loading…
Reference in New Issue