Create a Publication-Ready Rietveld Plot

In this exercise a plot will be created in a form intended for publication from a “finished” refinement in GSAS-II.

Step 1: Read in the project file

1.     Use the File/Open Project menu item to GSAS-II project file PubPlotTest.gpx. (If you used the Help/Download tutorial menu entry to open this page with the recommended downloading of the exercise files, then the you should see this file in the file browser. If not, you can manually download it from https://subversion.xray.aps.anl.gov/pyGSAS/Tutorials/RietPlot/data/; in this case you will need to navigate to the download location manually.)

At this point the GSAS-II data tree window will have several entries. If the PWDR entry is not selected (as below), click on it.  

 

 

 

 

and the plot window will show the powder pattern along with the fit:

 

Step 2: Format Plot

The plot above can be improved a bit, for example by moving the difference curve down so it can be seen more clearly. First click on the  “Shrink Y” yellow tool bar button (shown to right) to make some room at the bottom of the plot.

 

Make sure that the zoom or pan buttons are not selected. Then click with the left mouse button on the cyan different curve and while holding the button down, drag the difference curve down a little bit. This will now be too close to the blue reflection tick marks, so they can be dragged down as well, by clicking on them, moving the mouse with the button down and releasing the button when the tick marks are in the chosen spot. Note that if the drag operation does not work, then zoom or pan mode is very likely selected, or the PWDR item has not been selected from the tree.

 

We can make the plot a bit more compact, by either using “Zoom” to draw a box around the region to be displayed or by pressing the “Home” button. I used zoom to get this:

 

Step 3: Magnification Regions

While not particularly important for the plot above, many datasets are dominated by a few intense peaks and it can be of significant value to increase the scale in other regions. To add magnification via the mouse, first turn off the zoom mode, if on. Move the mouse to around 60 degrees (vertically, anywhere inside the axes) and press “a” to add a magnification region. A line appears on the plot and a magnification region is added to the data window, as shown to right. Another way to add magnification is with the “Add a magnification region” button. Press that to add a second region. This adds a region starting somewhere around the middle of the pattern. Change the location of this to around 40 degrees, if needed and the magnification factors to 1.5 and 2.5 respectively. The window and plot will look as below.

 

Step 4: Customize the Publication Plot

Press the “P” button to the right of the toolbar. This opens a window where aspects of the plot can be customized, as below. Note that as changes are made in the controls at the top of the window, these changes are displayed immediately. Also note the addition of a additional difference plot at the bottom. This shows the weighted difference between the observed and calculated diffraction pattern ([obs-cal]/sigma); the square of this is what is actually minimized.

 

As examples of the types of changes that can be made here:

·      Most journals will want larger lettering for labels so change the text size to 18

·      We can use LaTeX symbols in the phase caption, so let’s change that to $\rm\alpha-LaB_6$

·      Click on “Include in legend” for obs and calc to include them in the legend

·      Click on the cyan square for the diff color and choose something more to your liking (brown here)

·      Make the symbols and lines a bit more visible (when the plot is shrunk) by changing the symbols to an “x”, the size to 10, the line widths to 1.5 and the tick width to 2.5.

The plot now appears as below:

 

The export format can be selected using the pull-down menu for file format (shown to right). When the save button (at bottom) is used a file will be written in this format. The plot can be exported as a bitmap file by selecting an export format of png or tif, but better is to use pdf or svg, as these are vector formats and there will be no degradation of plot due to pixilation. This is to be preferred where possible.

 

Sample .pdf (PubPlotTest.pdf) and .png (PubPlotTest.png) files can be found in this directory:  https://subversion.xray.aps.anl.gov/pyGSAS/Tutorials/RietPlot/examples/

 

The remaining formats allow the plot to be exported to other plotting programs where further customization is possible. The Grace and Igor Pro programs both allow input of values and plotting instructions (I am interested to hear of any others) and are supported as export formats (see below). For other programs, such as Origin, the data in the plot can be read from the .csv version of the file, but the user must construct the plot themself.

Step 5: Export to Grace

The Grace program (originally called XMGR) is a free open-source WYSIWYG plotting tool. While Grace has not been updated in about a decade and is not easy to run on all platforms, the excellent QtGrace port runs on Windows, Mac and Linux and is easy to download and install from here: https://sourceforge.net/projects/qtgrace/files/. There is also a GTK port of Grace that is likely of greatest interest to Linux users: GraceGTK (not tested).

 

To export to Grace select the “Grace input file, agr” for File format and press Save. Below shows the screen in QtGrace after reading the .agr file produced here. This can be annotated and extensively modified within Grace.

Step 6: Export to Igor Pro

Igor Pro is commercial software (and not cheap) but it is widely used in some circles and also does a great job for creating high-quality graphics. A free 30-day version demo is available.

 

To export to Igor Pro select the “Igor Pro input file, itx” for File format and press Save. Below is the Igor window after reading the .itx file. Note that it is easy to move the Intensity label and change the text in the legend, etc. Inset plots and many other features are available within Igor Pro.