Line graphs show quantitative data along two axes of variation. Consecutive data points are connected by a straight line, indicating an order in measurements, such as in a time series visualizing trends over time. They are mostly used to plot time series data or spatial transects. In contrast to scatter plots, line graphs always plot a dependent variable on the y-axis with a consecutive order on the x-axis, usually time or age.
Depending on the resolution, you either plot datapoints separately (low resolution, little data points) or plot them together (high resolution, many datapoints). When there is a gap in your data, e.g., due to a missing measurement or incomplete recovery of a core, include a line break to indicate the gap.
When your data is measured as an average of a continuous time or space interval, e.g., calculated sedimentation rates, connecting data points does not accurately represent your data. In this case, you could use horizontal lines instead. In this case your line graph becomes known as a stairs graph.
When you want to visualise a time series of proportional data from a variable with different categories (adding up to 100%), you can make a stacked line graph.
You can plot multiple datasets in one graph as individual lines14. However, adding too many lines may make your graph look cluttered. If this is the case, it is better to use multiple windows.
In Earth sciences, you often want to visualise multiple variables of one time series, e.g., temperature, precipitation, and evaporation in one graph. In general, the best way to do this is by using multiple vertically aligned windows (stacked subplots). This makes it possible to spot similar patterns in your data and is a common way to plot data in Earth sciences, see this paper by Capron et al. (2019) for an example.
Do not plot multiple variables (y-axes) in one window when your lines are intersecting or interfering with each other. This can confuse your audience. If you want to assess synchroneity of two variables, you could plot two y-axes in one graph. This is specifically useful when you want to study e.g., cyclicity of lake levels and rainfall with astronomical forcing. For an example, see Fig. 2 and Fig. 3 from this paper by Martínez-García et al. (2014).
Although this way of plotting multiple variables is common practice in Earth sciences, it might lead to incorrect interpretations and an unintentional misleading of your audience. Therefore, be careful with how you plot your data. There are two important concepts to keep in mind:
- When you plot multiple facets with the same variable from different datasets, g., two temperature time series from different study sites, make sure the y-axis range is the same for both graphs. Imagine the time-series temperature on the y-axis ranges from 10-15 degrees, whereas it ranges from 10-30 degrees on the other. This can lead to a seeming trend in temperature when there isn’t one, or conversely hide an existing trend. For this reason, avoid default settings for axis range – it is better to set the axis range manually to make sure it is the same across all your facets.
- Be careful with your interpretations if you are plotting multiple variables of one time series in facets (windows). When you are plotting different variables, you will automatically have different y-axes. This could create a misleading figure: you may observe a similar trend in two variables, but if the relative change in one of the variables is much larger than in the other, this trend might not be meaningful. There is no easy fix for this, just always keep asking yourself: ‘Is this a meaningful axis range and trend?’.
A stratigraphic plot is a special type of line graph which is often used in Earth sciences to plot data from sedimentary records. In a stratigraphic plot, the axes are often reversed compared to a regular line graph. The independent variable (age or depth) is plotted in the vertical direction, and the dependent variable(s) is (are) plotted in the horizontal direction. This way, the y-axis with depth or age resembles the vertical location of the layers. Stratigraphic plots are often combined with stratigraphic columns, schematic illustrations that indicate the lithology of the section. For an example of a stratigraphic plot, see Fig. 2 in this paper by Knies et al. (2018).
In theory, when plotting count-data, e.g., species counts, you should use bar graphs as your dependent variable is discrete. However, species counts are also plotted as line graphs in a stratigraphic plot.