Skip to main content
A scatter plot draws a geom.point() per observation against two continuous axes — the tool for correlation and distribution. Add a size mapping and it becomes a bubble chart, encoding a third variable.

Scatter

Map two numeric columns to x and y, and declare continuous scales:

Coloring by category

Map a category to color to distinguish groups of points:

Bubble

Map a third numeric column to size and add a size scale. The default size scale uses a square-root transform, so bubble area is proportional to the value:
  • Scales — continuous and size scales
  • Statistics — add a smooth trendline over the points