NAPISD
PAHdb website C++ backend
Loading...
Searching...
No Matches
Plot.cpp
1#include "Plot.h"
2
3Plot::Plot()
4 : _xlimits({-1.0, 1.0}), _ylimits({-1.0, 1.0}), _zlimits({-1.0, 1.0}),
5 _xmargins({0.15, 0.9}), _ymargins({0.15, 0.85}), _zmargins({0.15, 0.9}),
6 _title(""), _fontsize(1.0), _majorticklength(1.0),
7 _minorticklength(2.0 / 3.0), _drawhorizontalgrid(false),
8 _drawverticalgrid(false), _drawhorizontalfinegrid(false),
9 _drawverticalfinegrid(false), _advance(true) {
10
11 type = Type::I_Plot;
12 _items.reserve(4);
13 _xaxis.emplace_back();
14 _yaxis.emplace_back();
15 _zaxis.emplace_back();
16}
17Plot::Plot(Plot const &other) {
18 type = other.type;
19
20 _xlimits = other._xlimits;
21 _ylimits = other._ylimits;
22 _zlimits = other._zlimits;
23 _xmargins = other._xmargins;
24 _ymargins = other._ymargins;
25 _zmargins = other._zmargins;
26 _title = other._title;
27 _horizontalgrid = other._horizontalgrid;
28 _verticalgrid = other._verticalgrid;
29 _xaxis = other._xaxis;
30 _yaxis = other._yaxis;
31 _zaxis = other._zaxis;
32 _fontsize = other._fontsize;
33 _majorticklength = other._majorticklength;
34 _minorticklength = other._minorticklength;
35 _drawhorizontalgrid = other._drawhorizontalgrid;
36 _drawverticalgrid = other._drawverticalgrid;
37 _drawhorizontalfinegrid = other._drawhorizontalfinegrid;
38 _drawverticalfinegrid = other._drawverticalfinegrid;
39 _advance = other._advance;
40
41 for (auto &item : other._items) {
42
43 _items.emplace_back(item->clone());
44 }
45}
46Plot *Plot::clone() const { return new Plot(*this); }
47void Plot::add(CanvasItem &item) { _items.emplace_back(item.clone()); }
48
49void Plot::add(std::vector<CanvasItem> &items) {
50
51 for (auto &item : items) {
52
53 _items.emplace_back(item.clone());
54 }
55}
Definition Plot.h:20

Since FY2019 the NASA Ames PAH IR Spectroscopic Database is being supported through a directed Work Package at NASA Ames titled: "Laboratory Astrophysics - The NASA Ames PAH IR Spectroscopic Database".
Since FY2023 the NASA Ames PAH IR Spectroscopic Database is being supported through the Laboratory Astrophysics Rd 2 directed Work Package at NASA Ames.
© Copyright 2021-2025, Christiaan Boersma