Customizing and saving plots

This tutorial covers how to customize plots in RAW and save plots from RAW. Note that RAW is not meant to be a program for making publication quality plots, and has a number of limitations when it comes to plots, but some people find it convenient to use the plots made in RAW for various purposes.

The written version of the tutorial follows.

Customizing plots in RAW

  1. Load the glucose_isomerase.dat dataset in the reconstruction_data folder.

  2. Use the “1” button in the plot toolbar at the bottom of the RAW window to show just the Main Plot.

    show_plot1_png

  3. Right click on the plot and select “Plot Options…” in the right click menu.

    • Note: Plot options only affects the plot you click on. Each plot has its own set of options.

    show_plot_options_png

  4. In the options window that opens, do the following: remove the plot title, turn on the legend, change the font for all items to Arial.

    • Note: Not all fonts are available on all systems, you may have to select a different font.

    plot_options1_png

  5. In the options window, do the following: Turn on the Top and Right borders, Change the x-axis label to give the q units, as “$q$ $[1/\AA]$”. Click “Okay” to exit the plot options window.

    • Tip: Anything inside of “$” signs in a plot label or legend label is parsed as a TeX markup, which allows you to use special symbols like the angstrom symbol, Å, as $\AA$. A useful guide to allowed formatting and special characters input can be found in the matplotlib documentation: https://matplotlib.org/stable/tutorials/text/mathtext.html

    plot_options2_png

  6. Checkpoint. Your plot should now look like this

    plot_checkpoint1_png

  7. Adjust the size of the RAW window to adjust the aspect ratio of the plot and make it roughly square.

  8. Use the horizontal slider bar button in the plot toolbar to open the margin adjustment for the plot.

    plot_margins1_png

  9. In the window that opens, use the left, right, top, and bottom sliders to bring the edges of the plot close to the edges of the window. Close the margin adjustment window when done.

    plot_margins2_png

  10. Click on the colored line in the glucose_isomerase.dat item in the Profiles Control Panel to open the Line Properties window.

    plot_line_properties1_png

  11. In the Line Properties window, set the Legend Label to “Glucose Isomerase”, Set the Line “Style” to “None”. Set the Data Point Marker “Marker” to “.”. Set the marker “Size” to “4”. Set all the Colours to green. Set the Error Bars “Width” to 0.25. Click “OK” to exit the line properties dialog.

    plot_line_properties2_png

  12. Use the error bar button in the plot toolbar to turn on error bars for the plot.

    plot_errorbars_png

  13. Checkpoint. Your plot should now look like this:

    plot_checkpoint2_png

  14. Open the plot Options dialog again. Turn off autolimits and adjust the y limits To have a minimum of 2e-5 and a maximum of 0.065.

    • Tip: You can also use the crossed arrows and the magnifying glass in the plot toolbar to adjust the scale of the plot.

    plot_options3_png

  15. Click on the legend text (“Glucose Isomerase”) and drag the legend to a new position in the plot (e.g. a bit further away from the top right corner).

  16. You’ve now adjusted everything that you can about the plot in RAW. Your plot should look like this:

    plot_checkpoint3_png

Note: All of the main plots in RAW (“Profiles”, “IFTs”, “Series”) can be customized in a similar way. All of the items in the control panel have the line options dialogs. All of the plots have plot options. Analysis plots (such as the Guinier plot) don’t generally have most of these customization options. All of the analysis plots will have the ability to set the margins and to zoom/drag to adjust what’s visible, not nothing else. The exception to this is the Dimensionless Krakty plot, where you can adjust the line color (but nothing else).

Note: You can customize plot 1, plot 2, or plots 1 and 2 in panels with multiple plots. This example used only plot 1 for convenience, but you could use either or both plots as desired.

Saving plots in RAW

  1. Click the Save icon in the plot toolbar at the bottom of the plot window to open the save dialog.

    plot_save_png

  2. Select an appropriate file type, filename, and location, then save the image.

Note: We recommend using vector graphics formats for plots that you’ll be including in presentations or papers. Vector graphics are images that can be rescaled (preserving aspect ratio) arbitrarily without loss of quality. We recommend the “Scalable Vector Graphics” (.svg) format for vector graphics saved with RAW, but you can select other options as it suits your needs. For raster graphics (e.g. images with a defined set of pixels) we recommend “Portable Network File” (.png) as it has lossless compression.