Figures
General
- Generate figures algorithmically as much as possible, as clear scripts in an open code repository.
- Know the difference between vector and bitmap graphics, and output your figures appropriately.
- Aesthetic touch-ups can be made after exporting your figure, for vector graphics (Adobe Illustrator, Affinity Designer, or the free Inkscape) or bitmap graphics (Adobe Photoshop, or the free GIMP).
- Label your axes clearly, with units of measurement in parentheses.
- If using python, the typical pipeline outputs to svg and then does post-processing in Inkscape. You may find this scour package useful for cleaning up the svg files.
Here is a great presentation by Dan Larremore on how to present data clearly.
Color palettes
You should select the color palette for your figures carefully, with a priority towards making the key pieces of science that you’re trying to communicate as clear as possible. Be especially wary of common forms of colorblindness, and giving some thought to how readable figures are in greyscale. There are tools for simulating different types of colorblindness.
When using a continuous color scale, avoiding the colormap jet
will prevent incurring the wrath of passionate jet fighters, who will direct you to automatically ‘fix’ your colormap.
- If you love a good rainbow , the turbo colormap is a solid alternative to jet.
- Pick from some classics.
- Here is a good way to select nice color palettes.
- Algorithmically make your own.
- Another algorithmic one.
- Another way to make your own.
Plotting distributions
For data exploration, you should always avoid plots that make assumptions about the distribution of values (like those that plot the mean plus/minus standard deviation). Alternatives include violin plots:
- Violin Plots: Matlab Code.