A line plot represents the relationship between 2 variables. The X axis must represent an **ordered** value. The most common example is to represent time on this axis: then we talk about time series. Since other techniques exist

for time series, it has a dedicated section. Ggplot2 allows to realise this type of chart using the **geom_line** geometry. A common caveat is to display too many lines on the same chart, resulting in a spaghetti plot which

does not deliver any insight. Thus, consider using small multiples, and note that area chart are often another good alternative to line chart.

Sponsors

**ggplot2**

**Base R**

**Other charts involving line plots**

**Related**

**Search the gallery**