library(officer)
dat <- data.frame(
x = c(1, 2, 3, 4, 5),
y = c(10, 20, 15, 25, 30),
sz = c(5, 10, 7, 15, 12),
grp = rep("s1", 5)
)
bubble <- ms_bubblechart(
data = dat, x = "x", y = "y",
size = "sz", group = "grp"
)
# adjust axes to avoid clipping extreme bubbles
bubble <- chart_ax_x(bubble, limit_min = 0, limit_max = 6)
bubble <- chart_ax_y(bubble, limit_min = 5, limit_max = 35)
bubble
Run the code above in your browser using DataLab