Making Better Plots and Figures

Vector Graphics and Plotting Softwares

I have found that some students and researchers are often unaware of or do not care much about using the right tools for making plots and figures for scientific literature. Using a better software will not suddenly make your papers/presentations better; they will however make your job of creating crisp and clear figures that much easier.

Before going further, lets talk about the main types of figures one would encounter. Most often, plots and figures are line diagrams. Such diagrams should be rendered as vector graphics instead of bitmap formats (such as gif, jpeg, tiff, etc.). Vector graphics is a format that uses texts and geometric figures (lines, dots, circles, etc.) to render a figure. The advantage of vector graphics is that they are scalable, i.e., you can shrink or enlarge the size of the graphics without any loss of information

My choice of softwares to generate vector graphics are Xfig and Mayura Draw. For making plots, I use either Matlab or Kaliedagraph. All these softwares allow users to save the figures in Encapsulated Post Script (eps) format (for LaTeX documents) as well as copy-paste figures in metafile format (for Word or Powerpoint). In fact, I use Xfig and Matlab if I am writing documents in LaTeX, and Mayura and Kaliedagraph if I am writing documents in MS Word.

Tips on Making Plots for Reports and Presentations

I have been meaning to write about plotting your results for print and presentations. This document is modified and expanded version of what I had written earlier. A cached copy of that document titled “Tips on making better plots” is available.

I am going to use examples to illustrate good practice in plotting your results. First, a caveat. The figures used in this post are created using Excel. Excel is not a plotting software; investing in software like Kaleidagraph or Origin Plot is well worth the money. These softwares have more features that come very handy when you need to plot your research data. The result is neater and easier to read graphs. Having said that, one can use even software such as Excel to prepare easy to read graphs.

General Guidelines

Lets start with some general guidelines that I got from my Post-doctoral adviser, Dion Vlachos. Although these were specifically developed for Kaleidagraph, I believe they constitute “good practices” for creating figures using any software

  • Aspect Ratio
    • Typical aspect ratio (width:height) for single-panel figures should be 4:3
  • Font Size and Type:
    • The fonts should be readable when the figure is scaled to the appropriate size.
    • Often, the size of figure in the plotting software is larger than what will be used in documents or presentations.
    • When the figure is scaled, the smallest font should be ~10 pt in documents and ~18 pt in presentations.
    • Typically, serifed fonts (e.g., Times New Roman) are preferred in documents and sans-serif (e.g., Arial) fonts in presentations.
    • I prefer to create figures with 20 pt “Times” font, so that the same figure can be scaled to appropriate sizes for both documents and presentations
  • Lines
    • Lines should be 2 pt thick so that they render well in the final figure.
  • Avoid gridlines unless they convey something specific.
  • Colours
    • Ensure that there is enough contrast between the foreground and the background.
    • Black on white gives the best contrast. However, any dark colour on white background can give good results.
    • Do not rely only on colour to convey information. You may need to print in black-and-white.
    • Colours do not render the same on your computer screen, in print and when projected. If using colours, make sure they differ sufficiently from each other, while satisfying the above rules
  • Legends
    • Legends should be clear, legible and convey (some) key information
    • Put legends next to curves, if possible, instead of having them separately.

Remember, there will always be exceptions where the above guideline(s) need to be broken for making better figures. Unless you have specific reasons, its generally good idea to abide by these guidelines.

Example of Guidelines in Action

The following is an example of common problems I have observed with presentation. The problem lies in accepting the default figure and not giving so much as even a passing thought on whether the plot makes any sense. While this is an example from Excel, such problems are not restricted to any particular software.

Example of Plot in MS Excel with Default Options
An improved version of the plot

This is not an example I concocted just to make a point. The third default colour that Excel uses is in fact yellow and the plot background is gray. Plots like this are, unfortunately, commonly used in presentations. All I did is take data from certain model simulations and plotted it in Excel. While the figure renders OK on screen, it will not render well in documents or presentations. I spent just about 5 minutes to improve this plot (right-hand figure). The main differences are:

  • The abscissa and ordinate are now labelled.
  • The plot focusses on the more critical data (6 to 12 cm). All the physics is really happening within the initial 12 cm. Plotting the same data up to 100 cm (as was done in the first figure) masks the more useful phenomena. The second plot already shows that the trend settles close to the steady state value of 1180 K. Your figures should highlight the most important parts of your story.
  • The white-space to the right of the plot is eliminated. Using that region for legend is a waste of precious real estate.
  • Fonts are more readable (serif, larger size).
  • The line is much clearer now. The contrast is better, the line is thicker and I got rid of the unnecessary background and grid lines.
  • The legend “5% Propane + 95% Air” conveys information to help the reader understand the plot / trends better. On the other hand, “Series 1” conveys no meaning.