1

I'm trying to create a bubble chart that look like this using e_scatter.

enter image description here

This is what the data looks like and the state I am able to recreate now

data <- data.frame(
    group = c("Upper", "Upper", "Upper", "Upper", "Upper", "Upper", "Upper", "Upper", "Lower", "Lower"),
    category = c("A", "B", "C", "D", "E", "F", "G", "H", "a", "b"),
    size = c(0.74, 0.72, 0.68, 0.67, 0.63, 0.54, 0.53, 0.49, 0.02, 0.02),
    sample_x = c(0, 0.2, 0.4, 0.6, 0.8, 0.8, 0.6, 0.4, 0.2, 0),
    sample_y = c(1, 2, 3, 2, 1, -1, -2, -3, -2, -1)
)

data |>
group_by(group) |>
e_charts(sample_x) |>
e_scatter(sample_y, size)

enter image description here

Originally the data only have group, category and value columns

Because I don't have x and y in the data, is it possible to recreate the bubble chart using e_scatter?

Or am I using the wrong chart type for this?

(I did try by adding e_polar but I couldn't scale the size of the dot using size column)

Uwe Keim
  • 39,551
  • 56
  • 175
  • 291
Richard
  • 11
  • 3
  • 1
    I found some content on this type of graph in Apache Echarts testing, but not anywhere else. I'm sure there's a way, though. However, for simplicity, you could use many other avenues to make this plot. While "bubble plot" is definitely accurate for the type of plot you want, its alternate name will get you there faster, "circle packing diagram." [Here are a few different ways to make that happen](https://r-graph-gallery.com/circle-packing.html). – Kat Feb 23 '23 at 18:56

0 Answers0