library(ggpie)
library(ggplot2)
data(diamonds)
# circle label and out of pie
ggdonut(
data = diamonds, group_key = "cut", count_type = "full",
label_info = "all", label_type = "circle",
label_size = 4, label_pos = "out"
)
# circle label and in pie plot, with no split
ggdonut(
data = diamonds, group_key = "cut", count_type = "full",
label_info = "all", label_type = "circle", label_split = NULL,
label_size = 4, label_pos = "in"
)
# horizon label and in pie plot, with no split
ggdonut(
data = diamonds, group_key = "cut", count_type = "full",
label_info = "all", label_type = "horizon", label_split = NULL,
label_size = 4, label_pos = "in"
)
# horizon label and in pie plot
ggdonut(
data = diamonds, group_key = "cut", count_type = "full",
label_info = "all", label_type = "horizon",
label_size = 4, label_pos = "in"
)
# horizon label and out of pie plot, with no split
ggdonut(
data = diamonds, group_key = "cut", count_type = "full",
label_info = "all", label_type = "horizon", label_split = NULL,
label_size = 4, label_pos = "out"
)
# horizon label and out of pie plot
ggdonut(
data = diamonds, group_key = "cut", count_type = "full",
label_info = "all", label_type = "horizon",
label_size = 4, label_pos = "out"
)
# with label threshold
ggdonut(
data = diamonds, group_key = "cut", count_type = "full",
label_info = "all", label_type = "horizon", label_split = NULL,
label_size = 4, label_pos = "in", label_threshold = 10
)
ggdonut(
data = diamonds, group_key = "cut", count_type = "full",
label_info = "all", label_type = "horizon",
label_size = 4, label_pos = "in", label_threshold = 10
)
Run the code above in your browser using DataLab