YASH_1NT23IS252_09

Author

Yash Pratap

library(ggplot2)
# Using iris dataset
ggplot(iris, aes(x = Sepal.Length)) +
  geom_histogram(binwidth = 0.3, fill = "skyblue", color = "black") +
  facet_wrap(~ Species) +  # creates a histogram for each species
  labs(
    title = "Distribution of Sepal Length by Species",
    x = "Sepal Length",
    y = "Count"
  ) +
  theme_minimal()