# NOT RUN {
T1 <- xtabs(~type, data = Poison)
T1
par(mar = c(5.1 + 2, 4.1, 4.1, 2.1))
barplot(sort(T1, decreasing = TRUE), las = 2, col = rainbow(6))
par(mar = c(5.1, 4.1, 4.1, 2.1))
rm(T1)
# }
# NOT RUN {
library(ggplot2)
ggplot2::ggplot(data = Poison, aes(x = type, fill = type)) +
geom_bar() +
theme_bw() +
theme(axis.text.x = element_text(angle = 85, vjust = 0.5)) +
guides(fill = FALSE)
# }
# NOT RUN {
# }
Run the code above in your browser using DataLab