Ideas for Improving Your Scientific Visualizations
by eric
Scientific graphics are one of the most important means we have of communicating complicated quantitative information. Here are a few ideas for improving the effectiveness of your figures:
- Learn a new feature of your graphics package. Most of us only use a fraction of the capabilities of our graphics programs. There’s much to be gained from digging around in the documentation. Users of python’s matplotlib might want to play around with the AxesGrid toolkit, learn about animation or widget capabilities, or look through these recipes. IDL users could define more sensible plotting defaults.
- Read a book. Edward Tufte’s Visual Display of Quantitative Information is rightly a classic. Its principles for evaluating the information density of figures will change how you think about graphical communication. Nathan Yau‘s Visualize This (and his website, FlowingData) provide a look at today’s cutting edge of information graphics.
- Learn about color perception. Scientists love rainbow colormaps. However, rainbow colormaps create perceptual artifacts that obscure the very trends you’re trying to display. Perceptual colormaps are a better alternative. The ColorBrewer colormaps are the most well-known. Python’s matplotlib has them built-in (try
help(plt.colormaps)
), and versions are available for IDL as well. - Use alpha transparency. Most modern graphics packages support semi-transparent elements via an alpha keyword, typically specified between 0.0 (completely transparent) and 1.0 (completely opaque). Making lines or scatterplot points semi-transparent can improve the clarity of the plot if there is overlap or variation in point density.
- Learn about web visualization. Static figures aren’t going anywhere–they’re easy to print, share, and display on slides. However, both the true day-to-day practice of science and the needs of large datasets require an exploratory approach to visualization. Interactive analysis needs sophisticated software, however. The most nearly universal means to share interactive visualizations is via the browser, with its widely available JavaScript runtime.
Today, the d3.js library is the most popular JavaScript visualization library. It is hugely capable, though with its power comes complexity. Check out an online tutorial or a book to get started.
One danger about transparency, though: PostScript doesn’t support it, so transparency effects won’t work for the many journals that only accept figures in PS format. Yet another reason to sign that PDF-figures petition!