A jitter plot is a type of scatter plot that adds a small amount of random noise to the data points in order to prevent them from overlapping. This technique is especially useful when dealing with discrete data or when there are many observations that would otherwise fall on top of each other, making it difficult to see the distribution and density of the points.

Let’s make a jitter plot to visualize the evolution of the structure of electricity generation in Spain over the last 10 years. Each dot in the plots below shows the daily energy produced by each technology in 2013 and 2023 (in GWh). The dot clouds represent the level of dispersion in the output for each technology (i.e., the variability of RES-based sources, the flexible dispatch of coal-fired and hydro power plants, the concentration of nuclear generation around 3-4 clusters, etc., can be easily visualized).

The clouds are sorted according to the total energy output (in TWh) by technology. We can see how coal became almost irrelevant in 2023 compared to 2013, wind is first with a significant increase, nuclear remains in the second position, and both solar PV and CCGT increased significantly, etc.

In summary, a jitter plot helps us visualize a time series, providing valuable and complementary insights to traditional line charts, column charts, etc. The plots were created in \(R\) using the ggplot2 package.