df <- data.frame(
name = rep(c("Dim1", "Dim2"), each = 2),
p = c(0.6, 0.4, 0.7, 0.3),
groupvar = rep(c("Group A", "Group B"), 2)
)
colors <- c("Group A" = "#1b9e77", "Group B" = "#d95f02")
.pchc_plot_by_dim(df, ylab = "Proportion", title = "Example Plot", cols = colors)
Run the code above in your browser using DataLab