1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139 140 141 142 143 144 145 146 147 148 149 150 151 152 153 154 155 156 157 158 159 160 161 162 163 164 165 166 167 168 169 170 171 172 173 174 175 176 177 178 179 180 181 182
|
Customizing and saving plots
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
.. _raw_save_plot:
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
*****************************
#. Load the **glucose_isomerase.dat** dataset in the reconstruction_data folder.
#. Use the "1" button in the plot toolbar at the bottom of the RAW window to
show just the Main Plot.
|show_plot1_png|
#. 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|
#. 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|
#. 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|
#. Checkpoint. Your plot should now look like this
|plot_checkpoint1_png|
#. Adjust the size of the RAW window to adjust the aspect ratio of the plot and
make it roughly square.
#. Use the horizontal slider bar button in the plot toolbar to open the margin
adjustment for the plot.
|plot_margins1_png|
#. 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|
#. 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|
#. 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|
#. Use the error bar button in the plot toolbar to turn on error bars for
the plot.
|plot_errorbars_png|
#. Checkpoint. Your plot should now look like this:
|plot_checkpoint2_png|
#. 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|
#. 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).
#. 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
*****************************
#. Click the Save icon in the plot toolbar at the bottom of the plot window to
open the save dialog.
|plot_save_png|
#. 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.
.. |show_plot1_png| image:: images/show_plot1.png
:target: ../_images/show_plot1.png
.. |show_plot_options_png| image:: images/show_plot_options.png
:target: ../_images/show_plot_options.png
.. |plot_options1_png| image:: images/plot_options1.png
:target: ../_images/plot_options1.png
.. |plot_options2_png| image:: images/plot_options2.png
:target: ../_images/plot_options2.png
.. |plot_checkpoint1_png| image:: images/plot_checkpoint1.png
:target: ../_images/plot_checkpoint1.png
.. |plot_margins1_png| image:: images/plot_margins1.png
:target: ../_images/plot_margins1.png
:width: 400 px
.. |plot_margins2_png| image:: images/plot_margins2.png
:target: ../_images/plot_margins2.png
.. |plot_line_properties1_png| image:: images/plot_line_properties1.png
:target: ../_images/plot_line_properties1.png
:width: 400 px
.. |plot_line_properties2_png| image:: images/plot_line_properties2.png
:target: ../_images/plot_line_properties2.png
:width: 450 px
.. |plot_errorbars_png| image:: images/plot_errorbars.png
:target: ../_images/plot_errorbars.png
:width: 400 px
.. |plot_checkpoint2_png| image:: images/plot_checkpoint2.png
:target: ../_images/plot_checkpoint2.png
.. |plot_options3_png| image:: images/plot_options3.png
:target: ../_images/plot_options3.png
.. |plot_checkpoint3_png| image:: images/plot_checkpoint3.png
:target: ../_images/plot_checkpoint3.png
.. |plot_save_png| image:: images/plot_save.png
:target: ../_images/plot_save.png
:width: 400 px
|