library(ggpie)
library(ggplot2)
data(diamonds)
# do not show tick
ggrosepie(diamonds,
group_key = "color", count_type = "full", label_info = "all",
show_tick = FALSE, donut_frac = 0.3, donut_label_size = 3
)
# show tick and with automatic selection
ggrosepie(diamonds,
group_key = "color", count_type = "full", label_info = "all",
donut_frac = 0.3, donut_label_size = 3
)
# show tick and with specific break
ggrosepie(diamonds,
group_key = "color", count_type = "full", label_info = "all",
tick_break = c(3000, 5000, 7000, 11000), donut_frac = 0.3, donut_label_size = 3
)
# two group variable, and do not show tick
ggrosepie(diamonds,
group_key = c("color", "clarity"),
count_type = "full", label_info = "all",
show_tick = FALSE, donut_frac = 0.3, donut_label_size = 3
)
# two group variable, show tick and with automatic selection
ggrosepie(diamonds,
group_key = c("color", "clarity"),
count_type = "full", label_info = "all",
donut_frac = 0.3, donut_label_size = 3
)
# two group variable, show tick and with specific break
ggrosepie(diamonds,
group_key = c("color", "clarity"),
count_type = "full", label_info = "all",
tick_break = c(3000, 5000, 7000, 11000), donut_frac = 0.3, donut_label_size = 3
)
Run the code above in your browser using DataLab