A toolkit for working with phylogenetic data.
v0.24.0
formats/svg/matrix.hpp
Go to the documentation of this file.
1 #ifndef GENESIS_UTILS_FORMATS_SVG_MATRIX_H_
2 #define GENESIS_UTILS_FORMATS_SVG_MATRIX_H_
3 
4 /*
5  Genesis - A toolkit for working with phylogenetic data.
6  Copyright (C) 2014-2020 Lucas Czech and HITS gGmbH
7 
8  This program is free software: you can redistribute it and/or modify
9  it under the terms of the GNU General Public License as published by
10  the Free Software Foundation, either version 3 of the License, or
11  (at your option) any later version.
12 
13  This program is distributed in the hope that it will be useful,
14  but WITHOUT ANY WARRANTY; without even the implied warranty of
15  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
16  GNU General Public License for more details.
17 
18  You should have received a copy of the GNU General Public License
19  along with this program. If not, see <http://www.gnu.org/licenses/>.
20 
21  Contact:
22  Lucas Czech <lucas.czech@h-its.org>
23  Exelixis Lab, Heidelberg Institute for Theoretical Studies
24  Schloss-Wolfsbrunnenweg 35, D-69118 Heidelberg, Germany
25 */
26 
35 
36 #include <string>
37 #include <vector>
38 
39 namespace genesis {
40 namespace utils {
41 
42 // =================================================================================================
43 // Forward Declarations
44 // =================================================================================================
45 
46 class Color;
47 struct SvgGroup;
48 
49 template<class T>
50 class Matrix;
51 
52 // =================================================================================================
53 // Svg Matrix
54 // =================================================================================================
55 
57 {
58 public:
59 
60  // -------------------------------------------------------------
61  // Properties
62  // -------------------------------------------------------------
63 
64  double pixel_width = 10.0;
65  double pixel_height = 10.0;
66 
67  double width_overlap = 1.0;
68  double height_overlap = 1.0;
69 
71 
78  double column_label_rotation = -90.0;
79 
80 };
81 
83  Matrix<Color> const& mat,
84  SvgMatrixSettings settings,
85  std::vector<std::string> const& row_labels,
86  std::vector<std::string> const& col_labels
87 );
88 
90  Matrix<Color> const& mat,
91  SvgMatrixSettings settings,
92  std::vector<std::string> const& row_labels
93 );
94 
96  Matrix<Color> const& mat,
97  SvgMatrixSettings settings = {}
98 );
99 
100 } // namespace utils
101 } // namespace genesis
102 
103 #endif // include guard
double column_label_rotation
Rotation of the column labels.
SvgGroup make_svg_matrix(Matrix< Color > const &mat, SvgMatrixSettings settings, std::vector< std::string > const &row_labels, std::vector< std::string > const &col_labels)
Container namespace for all symbols of genesis in order to keep them separate when used as a library...