File: PlotDataset.h

package info (click to toggle)
ausaxs 1.1.8-1
  • links: PTS, VCS
  • area: main
  • in suites: sid
  • size: 72,592 kB
  • sloc: cpp: 49,853; ansic: 6,901; python: 730; makefile: 18
file content (54 lines) | stat: -rw-r--r-- 1,372 bytes parent folder | download
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
// SPDX-License-Identifier: LGPL-3.0-or-later
// Author: Kristian Lytje

#pragma once

#include <plots/Plot.h>
#include <dataset/DatasetFwd.h>

namespace ausaxs::plots {
	class PlotOptions;

	/**
	 * @brief Plot the contents of a specific \class Dataset object.
	 * 		  Multiple datasets can be plotted by chaining calls to the plot() method.
	 */
	class PlotDataset : public Plot {
		public:
			/**
			 * @brief Default constructor.
			 */
			PlotDataset() = default;

			/**
			 * @brief Constructor.
			 */
			PlotDataset(const Dataset& d, const plots::PlotOptions& options);

			/**
			 * @brief Destructor.
			 */
			~PlotDataset() override;

			/**
			 * @brief Plot an additional Dataset. 
			 */
			PlotDataset& plot(const Dataset& data, const plots::PlotOptions& options);

			/**
			 * @brief Plot a vertical line at the specified x coordinate.
			 */
			PlotDataset& vline(double x, const plots::PlotOptions& options);

			/**
			 * @brief Plot a horizontal line at the specified y coordinate.
			 */
			PlotDataset& hline(double y, const plots::PlotOptions& options);

			/**
			 * @brief Plot and save the input dataset at the specified location. 
			 * 	      This is a convenient shortcut for quickly creating a plot of a single dataset. 
			 */
			static void quick_plot(const Dataset& data, const plots::PlotOptions& options, const io::File& path);
		};
}