Home

Make beautiful plots

Most people only skim your abstract and figures. So why do so many figures look like they were exported from matplotlib with default settings? This is especially common in computer science — computational biology papers tend to put more time into this. Figures aren't just for papers either; any analysis you share at work deserves the same treatment.

Collect figures you like. Find researchers whose plots you admire and note them somewhere. I started with my previous colleagues at SecureBio.

Build templates. Many fields have standard analyses, so making templates saves you from starting at defaults every time. You can store them in your dotfiles.

Spend time on layout. Try horizontal, try vertical, swap your axes, put things side by side. Make sure moving from figure to figure feels natural.

Think about every element. Do you need that grid? Can you place the legend somewhere better? If a line doesn't add something, remove it. If you want a sense of what some of this looks like applied, I really like Figure 3 from my series of blood based-biosurveillance.

Get the colors right. Is your plot showing something sequential, divergent, or qualitative? Each has a corresponding palette, and picking the right one makes the figure easier to read. For under 12 colors I use colorbrewer or Paul Tol's colorblind-friendly schemes. For more than 15, Colorgorical.

Make your caption the main takeaway. When you can, make it the finding, not the description. It's the easiest win for skimmers.

Export as svg or pdf, not png. These scale without losing quality. And if you can't get the layout you want in your plotting editor, open it in Illustrator or Affinity and adjust it there. Multi-panel alignment and custom annotations are often easier outside of your plotting library.