Plotting Data
Overview
- See Fundamentals of Data Visualization for a nice introduction to data visualization and techniques for visualizing different types of information.
Color selection
Simple tools for mastering color in scientific figures
Choosing color palettes for scientific figures
Color In Scientific Figures (AJE, Stacie Meaux)
Color palette
Color palettes for colorblindness
ColorBrewer: Color Advice for Maps
Color palettes with hex codes (Matlab friendly)
Xmgrace
Creating the default settings for new graphs
Open xmgrace, make the desired changes to the various settings, save the file as ~/.grace/templates/Default.agr. A template appropriate for publication can be downloaded here. Note that in order to change the actual page dimensions, you need to go to View -> Page setup, and in the Page section, change Size to “Custom” and the Dimensions unit to be “in”, put 3.25 x 3.25 (requirement for half-page figure) or 7 x 7 (for full-page figure). This will fix the size on the output devices (X11, PDF, PNG, or actual printers). The resolution on the computer screen (X11) is set in the Resolution (dpi) text box, and the resolutions for other types of devices are set in File -> Print setup -> Resolution (dpi). Unfortunately, the resolution setting and the default print device are not saved in the template file, but see below.
Setting the default printer to print to .png files with 300dpi
Create the file ~/.grace/gracerc.user and enter the following text:
HARDCOPY DEVICE "PNG"
DEVICE "X11" DPI 192
DEVICE "PNG" DPI 300
DEVICE "PDF" FONT ANTIALIASING on
DEVICE "EPS" FONT ANTIALIASING on
DEVICE "PostScript" FONT ANTIALIASING on Special symbols
Italic, bold
italic: \1italic
bold: \2bold
italic and bold: \3xyzSubscript, superscript
subscript: 3\s10\N
x-squared: x\S2\N\N returns the font position to normal.
Special symbols
Angstrom symbol: \cE\CFor other characters, look at this list: ascii table with low and high characters. Just use the character from the left column between \c and \C to produce the one from the right column. I highlighted the most interesting characters (for a scientist).
Greek letters
theta: \xq\0
rho: \xr\0\0 returns the font type to normal.
The \c, \C, and \x options are listed as deprecated in the xmgrace manual. The new method to insert special characters in xmgrace is:
- Press ctrl-e while positioned in a text-edit field to bring up the font dialog box.
- Select the desired font from the drop-down list. You probably want to use Symbol because it contains many of the commonly used special characters.
- Click on the character you want to insert
This will put something like
\f{Symbol}q\f{} into the text box.
Gnuplot
Creating the default settings for new graphs
You can use a template file to get a good default and ready-to-use color palettes for new graphs by putting the following line at the top of a new .gpl script.
load 'path/to/default.gpl' Ternary diagram
You basically need to calculate the (x,y) coordinates for all your data points as well as the three vertices of the triangle. This template file will produce something like this
Notes on figures
- When in doubt, check a recent publication in the target journal.
- Remove graph title.
- For a figure with multiple panels, assemble them in PowerPoint and export it as a single image of the correct dimensions.
- For a two-column layout, a single-column figure should have a width of ~3.25 in and a full-page figure should have a width of ~6.5 — 7 in, with at least 300 DPI. Make the image itself the correct size, instead of resizing it in Word or LaTeX. Some journals require figures to be uploaded separately and the sizing information in Word may be ignored.
- When displayed at the correct size, check that the fonts in the figure are not too small. They should be the same as or one point below the font size of the main text.
- Use the correct negative sign (in Xmgrace use Symbol font for label marks).
- Format variables (but not parentheses/square brackets, operators, or labels) italic; e.g., “E / k_B [K]” should have “E” and “k” italic, but not the division sign, label “B”, or the square brackets.
- Use a consistent number of significant digits in axis labels (except 0); e.g., 0, 0.5, 1.0, 1.5, …
- Start and end the axes at major or minor tick marks.
- As a general guideline, select an appropriate increment so that there are between 3 and 6 tick marks on each axis.
Comments
Comments powered by Disqus