Prog12

Author

Ashutosh

Program 12

Devolop a script in R to create a violin plot displaying the distribution of continuous variable, with separate violins for each group, using ggplot2

library(ggplot2)
data <- iris
ggplot(data, aes(x = Species, y = Sepal.Length, fill = Species)) +
  geom_violin(trim = FALSE) +
   labs(title = "Violin Plot of Sepal Length by Species",
       x = "Species",
       y = "Sepal Length") +
  theme_minimal() +
  theme(legend.position = "none")