---
title: "a4"
format: html
---

## 1.4.3 Exercises
(1) Make a bar plot of species of penguins, where you assign species to the y aesthetic. 

```{r}
library(tidyverse)
library(palmerpenguins)
penguins |> ggplot(aes(y = species)) + geom_bar()
```
How is this plot different? It's different b/c ...


# Question (2)
How are the following two plots different? Which aesthetic, color or fill, is more useful for changing the color of bars?

```{r}
ggplot(penguins, aes(x = species)) +
  geom_bar(color = "red")
```

```{r}
ggplot(penguins, aes(x = species)) +
  geom_bar(fill = "red")
```


What does the bins argument in geom_histogram() do?

Make a histogram of the carat variable in the diamonds dataset that is available when you load the tidyverse package. Experiment with different binwidths. What binwidth reveals the most interesting patterns?
