How to create a ggplot2 barchart with rounded bars using the ggchicklet package in the R programming language. More details: https://statisticsglobe.com/draw-ggpl...
R code of this video:
data1 <- data.frame(value = 1:4, # Create example data
group = LETTERS[1:4])
install.packages("ggplot2") # Install ggplot2 package
library("ggplot2") # Load ggplot2 package
ggplot(data1, aes(group, value)) + # ggplot2 barplot with regular corners
geom_col()
install.packages("ggchicklet") # Install & load ggchicklet package
library("ggchicklet")
ggplot(data1, aes(group, value)) + # ggplot2 barplot with round corners
geom_chicklet(radius = grid::unit(3, "mm"))
data2 <- data.frame(value = 1:12, # Create example data
group = rep(LETTERS[1:4], each = 3),
sub = letters[1:3])
ggplot(data2, aes(group, value, fill = sub)) + # Stacked barplot with round corners
geom_chicklet(radius = grid::unit(3, "mm"))
Follow me on Social Media:
Facebook – Statistics Globe Page: / statisticsglobecom
Facebook – R Programming Group for Discussions & Questions: / statisticsglobe
Facebook – Python Programming Group for Discussions & Questions: / statisticsglobepython
LinkedIn – Statistics Globe Page: / statisticsglobe
LinkedIn – R Programming Group for Discussions & Questions: / 12555223
LinkedIn – Python Programming Group for Discussions & Questions: / 12673534
Twitter: / joachimschork
Music by bensound.com
Watch video Draw ggplot2 Barplot with Round Corners (2 Examples) | ggchicklet Package | Stacked ggplot2 Barchart online without registration, duration hours minute second in high quality. This video was added by user Statistics Globe 17 September 2022, don't forget to share it with your friends and acquaintances, it has been viewed on our site 428 once and liked it 24 people.