Home icon
Data Visualisation Guide

GoG building blocks: geometric objects

1 minute read

Building blocks of the Grammar of Graphics

Geometric objects (sometimes also called “geoms”, or “marks”) are the elements in a chart that carry the encoded data as visual properties. The geometries determine the resulting type of plot. For example with points as geometric objects, you can create a scatter plot, while with a line geometry you produce line charts.

Geometric objects can be divided into 3 main categories, based on their dimensionality:

  • point geometries have zero dimensions, and are tied to a single location in a plot. Text geometries, used for placing text on a plot, are also considered point geometries, because they are also tied to a single location
  • path and line geometries are 1-dimensional. They can be used to connect points belonging to the same group, and they can create straight lines as well as curves
  • rectangles, other polygons and other shapes are 2-dimensional geoms

A grid of 18 small charts made with Observable Plot

The geometric objects available in Observable Plot. Source: observablehq.com/@observablehq/plot

Related pages

GoG building blocks: scales and guides

GoG building blocks: overview

GoG building blocks: data

GoG building blocks: aesthetics

GoG building blocks: transformations

Grammar of Graphics in practice: Tableau

Building blocks of the Grammar of Graphics