uvvispy.plotting module¶
Plotting: Graphical representations of data extracted from datasets.
Plotting relies on matplotlib, the “Swiss army knife” of graphical representations in the Python SciPy ecosystem.
Plotters implemented¶
The plotters implemented in this module can be separated into those specific for UVVis data and those that are generally applicable and were inherited from the ASpecD framework.
Specific plotters for UVVis data¶
Currently, there are no specific plotters implemented.
General plotters inherited from the ASpecD framework¶
A number of further plotters that are generally applicable to spectroscopic data have been inherited from the underlying ASpecD framework:
aspecd.plotting.SinglePlotter1D
Basic line plots for single datasets, allowing to plot a series of line-type plots, including (semi)log plots
aspecd.plotting.MultiPlotter1D
Basic line plots for multiple datasets, allowing to plot a series of line-type plots, including (semi)log plots
aspecd.plotting.MultiPlotter1DStacked
Stacked line plots for multiple datasets, allowing to plot a series of line-type plots, including (semi)log plots
Module documentation¶
- class uvvispy.plotting.SinglePlotter1D¶
Bases:
aspecd.plotting.SinglePlotter1D
1D plots of single datasets.
Convenience class taking care of 1D plots of single datasets.
As the class is fully inherited from ASpecD for simple usage, see the ASpecD documentation for the
aspecd.plotting.SinglePlotter1D
class for details.Examples
For convenience, a series of examples in recipe style (for details of the recipe-driven data analysis, see
aspecd.tasks
) is given below for how to make use of this class. The examples focus each on a single aspect.In the simplest case, just invoke the plotter with default values:
- kind: singleplot type: SinglePlotter1D properties: filename: output.pdf
- class uvvispy.plotting.MultiPlotter1D¶
Bases:
aspecd.plotting.MultiPlotter1D
1D plots of multiple datasets.
Convenience class taking care of 1D plots of multiple datasets.
As the class is fully inherited from ASpecD for simple usage, see the ASpecD documentation for the
aspecd.plotting.MultiPlotter1D
class for details.Examples
For convenience, a series of examples in recipe style (for details of the recipe-driven data analysis, see
aspecd.tasks
) is given below for how to make use of this class. The examples focus each on a single aspect.In the simplest case, just invoke the plotter with default values:
- kind: multiplot type: MultiPlotter1D properties: filename: output.pdf
To change the settings of each individual line (here the colour and label), supposing you have three lines, you need to specify the properties in a list for each of the drawings:
- kind: multiplot type: MultiPlotter1D properties: filename: output.pdf properties: drawings: - color: '#FF0000' label: foo - color: '#00FF00' label: bar - color: '#0000FF' label: foobar
Important
If you set colours using the hexadecimal RGB triple prefixed by
#
, you need to explicitly tell YAML that these are strings, surrounding the values by quotation marks.
- class uvvispy.plotting.MultiPlotter1DStacked¶
Bases:
aspecd.plotting.MultiPlotter1DStacked
Stacked 1D plots of multiple datasets.
Convenience class taking care of 1D plots of multiple datasets.
As the class is fully inherited from ASpecD for simple usage, see the ASpecD documentation for the
aspecd.plotting.MultiPlotter1DStacked
class for details.Examples
For convenience, a series of examples in recipe style (for details of the recipe-driven data analysis, see
aspecd.tasks
) is given below for how to make use of this class. The examples focus each on a single aspect.In the simplest case, just invoke the plotter with default values:
- kind: multiplot type: MultiPlotter1DStacked properties: filename: output.pdf
To change the settings of each individual line (here the colour and label), supposing you have three lines, you need to specify the properties in a list for each of the drawings:
- kind: multiplot type: MultiPlotter1DStacked properties: filename: output.pdf properties: drawings: - color: '#FF0000' label: foo - color: '#00FF00' label: bar - color: '#0000FF' label: foobar
Important
If you set colours using the hexadecimal RGB triple prefixed by
#
, you need to explicitly tell YAML that these are strings, surrounding the values by quotation marks.Sometimes you want to have horizontal “zero lines” appear for each individual trace of the stacked plot. This can be achieved explicitly setting the “show_zero_lines” parameter to “True” that is set to “False” by default. The offset is automatically set that spectra don’t overlap but can also be chosen freely (in units of the intensity):
- kind: multiplot type: MultiPlotter1DStacked properties: filename: output.pdf parameters: show_zero_lines: True offset: 0.3