sciplot  0.3.1
A modern C++ plotting library powered by gnuplot
Default.hpp
1 // sciplot - a modern C++ scientific plotting library powered by gnuplot
2 // https://github.com/sciplot/sciplot
3 //
4 // Licensed under the MIT License <http://opensource.org/licenses/MIT>.
5 //
6 // Copyright (c) 2018-2021 Allan Leal
7 //
8 // Permission is hereby granted, free of charge, to any person obtaining a copy
9 // of this software and associated documentation files (the "Software"), to deal
10 // in the Software without restriction, including without limitation the rights
11 // to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
12 // copies of the Software, and to permit persons to whom the Software is
13 // furnished to do so, subject to the following conditions:
14 //
15 // The above copyright notice and this permission notice shall be included in all
16 // copies or substantial portions of the Software.
17 //
18 // THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
19 // IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
20 // FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
21 // AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
22 // LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
23 // OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
24 // SOFTWARE.
25 
26 #pragma once
27 
28 // C++ includes
29 #include <cmath>
30 
31 // sciplot includes
32 #include <sciplot/Constants.hpp>
33 #include <sciplot/Enums.hpp>
34 
35 namespace sciplot
36 {
37 namespace internal
38 {
39 
40 const auto DEFAULT_FIGURE_HEIGHT = 200; // this is equivalent to 6 inches if 1 in = 72 points
41 const auto DEFAULT_FIGURE_WIDTH = static_cast<size_t>(std::round(DEFAULT_FIGURE_HEIGHT * GOLDEN_RATIO));
42 const auto DEFAULT_FIGURE_BOXWIDTH_RELATIVE = 0.9;
43 
44 const auto SCIPLOT_DEFAULT_PALETTE = "dark2";
45 
46 const auto DEFAULT_TEXTCOLOR = "#404040";
47 
48 const auto DEFAULT_LINEWIDTH = 2;
49 const auto DEFAULT_POINTSIZE = 2;
50 
51 const auto DEFAULT_FILL_INTENSITY = 1.0;
52 const auto DEFAULT_FILL_TRANSPARENCY = false;
53 const auto DEFAULT_FILL_BORDER_LINEWIDTH = 2;
54 
55 const auto DEFAULT_BORDER_LINECOLOR = "#404040";
56 const auto DEFAULT_BORDER_LINETYPE = 1;
57 const auto DEFAULT_BORDER_LINEWIDTH = 2;
58 
59 const auto DEFAULT_GRID_LINECOLOR = "#d6d7d9";
60 const auto DEFAULT_GRID_LINEWIDTH = 1;
61 const auto DEFAULT_GRID_LINETYPE = 1;
62 const auto DEFAULT_GRID_DASHTYPE = 0;
63 
64 const auto DEFAULT_LEGEND_TEXTCOLOR = DEFAULT_TEXTCOLOR;
65 const auto DEFAULT_LEGEND_FRAME_SHOW = false;
66 const auto DEFAULT_LEGEND_FRAME_LINECOLOR = DEFAULT_GRID_LINECOLOR;
67 const auto DEFAULT_LEGEND_FRAME_LINEWIDTH = DEFAULT_GRID_LINEWIDTH;
68 const auto DEFAULT_LEGEND_FRAME_LINETYPE = 1;
69 const auto DEFAULT_LEGEND_FRAME_EXTRA_WIDTH = 0;
70 const auto DEFAULT_LEGEND_FRAME_EXTRA_HEIGHT = 1;
71 const auto DEFAULT_LEGEND_SPACING = 1;
72 const auto DEFAULT_LEGEND_SAMPLE_LENGTH = 4;
73 
74 const auto DEFAULT_TICS_MIRROR = false;
75 const auto DEFAULT_TICS_ROTATE = false;
76 const auto DEFAULT_TICS_SCALE_MAJOR_BY = 0.50;
77 const auto DEFAULT_TICS_SCALE_MINOR_BY = 0.25;
78 const auto DEFAULT_TICS_MINOR_SHOW = false;
79 
80 } // namespace internal
81 } // namespace sciplot