Get Started →
Relationship Numerical

Bubble Chart

ggplot2: geom_point(aes(size = ...)) · Package: ggplot2 · Variables: 3 numerical + optional categorical (color)

WHAT IS A BUBBLE CHART?

A bubble chart extends the scatter plot by encoding a third numerical variable as the size of each point (bubble). This lets you visualize relationships among three variables simultaneously — X position, Y position, and size. Optionally, color can represent a fourth variable (usually categorical). Bubble charts work well for 10-100 data points and are popular in business contexts (e.g., plotting countries by GDP vs life expectancy, sized by population). Keep bubble counts moderate since overlapping bubbles reduce readability. In ggplot2, use geom_point() with aes(size = variable) and scale_size_continuous().

BEST FOR

  • · 3-variable relationship
  • · Adding size dimension to correlation
  • · Moderate data points (10-100)

AVOID WHEN

  • · Too many data points
  • · Small size differences
  • · Precise size comparison needed

R + GGPLOT2 CODE EXAMPLE

ggplot2
ggplot(mtcars, aes(x = wt, y = mpg, size = hp)) +
  geom_point(alpha = 0.6, color = "#ff6a00") +
  scale_size_continuous(range = c(2, 10)) +
  labs(title = "Weight vs MPG (sized by HP)", size = "Horsepower")

Run this code now

Paste the code above into RChat and see the bubble chart rendered instantly in your browser.

Try RChat Free →

SIMILAR CHART TYPES

ALTERNATIVES FOR YOUR DATA TYPE