r/rstats•
hogs94

Trying to make a bubble chart like this with gg plot? Seemingly no x or y axis, just evenly spaced bubbles where the variables are the size and color

Trying to make a bubble chart like this with gg plot? Seemingly no x or y axis, just evenly spaced bubbles where the variables are the size and color

Posted Apr 27, 2020, 8:41 AM UTC

15
sohaibhasan1•
1
hogs94OP•

Not just the axis labels and grids but like,

Do you think the creator of this chart mannually mapped those points and spaced everything out himself?

My hunch is that something was automated to do that based on how perfect the spacing is

2
TobyTheCamel•

You could try ggraph, either using a graph with no edges or using edges to keep nodes of similar sizes together but then hiding them in the final plot. That way you could avoid having to manually specify positions by allowing the physics engine to deal with it.

1
shaunson26•

Circle packing is what you're after.. There was a JavaScript add-on for R I used many moon ago. Good luck..

1
BurtFrart•

https://www.r-graph-gallery.com/circle-packing.html

This has a few packages and code examples for different types of circle packing graphs

1