Scientific Visualisations with Python

Designing effective scientific visualizations

Based on:

Rougier, N. P., Droettboom, M., and Bourne, P. E. (2014).
Ten Simple Rules for Better Figures, PLOS Computational Biology, 10(9)
DOI:

Rule 5: Do Not Trust the Defaults

Plotting libraries such as Matplotlib provide default settings for colors, fonts, line widths, markers, axes, and legends. These defaults are convenient, but they are not necessarily optimal for a particular dataset or scientific purpose. Customizing a figure does not mean decorating it. It means adjusting the visual properties to improve readability and emphasize relevant information.

Rule 6: Use Color Effectively

Color can help distinguish datasets, emphasize important features, and reveal patterns. However, unnecessary or inappropriate color choices can obscure the information. For example, a sequential colormap is often suitable for a heatmap of positive measurements, whereas a diverging colormap is appropriate when positive and negative deviations from a baseline are important. Avoid using rainbow colormaps by default. Their uneven perceptual transitions can make some changes appear more important than others.

Rule 7: Do Not Mislead the Reader

Scientific figures should represent the data as objectively as possible. Visual design choices can unintentionally exaggerate, minimize, or distort differences. For example, a bar chart whose vertical axis begins at 80 instead of zero may make small differences between values appear much larger. A truncated axis is not always inappropriate, but it should be used carefully and clearly indicated. The appropriate plot type also matters. Bar charts are generally useful for comparing magnitudes, while scatter plots can reveal relationships between two numerical variables. The choice should follow the scientific question.

Rule 8: Avoid Chartjunk

Chartjunk refers to unnecessary visual elements that distract from the data or make a figure harder to understand. The goal is not to remove every non-data element. Axes, labels, and reference lines can be essential. The goal is to retain only those elements that help the reader interpret the figure. When a plot contains many datasets, changing the layout may be more effective than simply adding more colors. For example, separate panels or small multiples can be easier to interpret than a single crowded plot.

Rule 9: Message Trumps Beauty

The ninth rule, “Message trumps beauty,” means that the primary goal of a scientific figure is to communicate an idea or a result clearly. A figure does not always need to look polished or realistic. In this example, the authors use hypothetical data and a sketch-like style to emphasize the general concept rather than precise numerical values. The important lesson is that visual design should support the message. However, when presenting actual experimental results, accuracy, transparency, and readability remain essential.