scatter
0.1.0
Figure.hpp
1
/*
2
* Copyright (C) Tobias Löw (tobi.loew@protonmail.ch)
3
*
4
* This file is part of Scatter
5
*
6
* Scatter is free software: you can redistribute it and/or modify
7
* it under the terms of the GNU General Public License as published by
8
* the Free Software Foundation, either version 3 of the License, or
9
* (at your option) any later version.
10
*
11
* Scatter is distributed in the hope that it will be useful,
12
* but WITHOUT ANY WARRANTY; without even the implied warranty of
13
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
14
* GNU General Public License for more details.
15
*
16
* You should have received a copy of the GNU General Public License
17
* along with Scatter. If not, see <https://www.gnu.org/licenses/>.
18
*/
19
20
#pragma once
21
22
#include <memory>
23
#include <scatter/FigureOptions.hpp>
24
#include <string>
25
#include <vector>
26
27
namespace
scatter
28
{
30
class
Plot;
31
37
class
Figure
38
{
39
public
:
48
Figure
(
const
FigureOptions
&options =
FigureOptions
(),
const
unsigned
&n_rows = 1,
const
unsigned
&n_cols = 1);
49
54
virtual
~Figure
();
55
64
void
add
(
const
std::shared_ptr<Plot> &plot,
const
unsigned
&row = 0,
const
unsigned
&col = 0);
65
72
void
save
(
const
std::string &file);
73
74
protected
:
75
private
:
77
const
FigureOptions
options_;
78
80
unsigned
n_rows_;
82
unsigned
n_cols_;
83
85
std::vector<std::vector<std::shared_ptr<Plot>>> plots_;
86
};
87
88
}
// namespace scatter
scatter::FigureOptions
[brief description]
Definition
FigureOptions.hpp:32
scatter::Figure
[brief description]
Definition
Figure.hpp:38
scatter::Figure::add
void add(const std::shared_ptr< Plot > &plot, const unsigned &row=0, const unsigned &col=0)
add a Plot to this Figure
scatter::Figure::save
void save(const std::string &file)
save the Figure to the given file
scatter::Figure::Figure
Figure(const FigureOptions &options=FigureOptions(), const unsigned &n_rows=1, const unsigned &n_cols=1)
constructor
scatter::Figure::~Figure
virtual ~Figure()
destructor
src
scatter
Figure.hpp
Generated by
1.11.0