24 #ifndef COM_DAFER45_TBTK_VISUALIZATION_MAT_PLOT_LIB_PLOT_SURFACE_PARAMETERS
25 #define COM_DAFER45_TBTK_VISUALIZATION_MAT_PLOT_LIB_PLOT_SURFACE_PARAMETERS
27 #include "TBTK/Visualization/MatPlotLib/matplotlibcpp.h"
33 namespace Visualization{
42 void setTitle(
const std::string &title,
bool overwrite =
true);
45 void setLabelX(
const std::string &labelX,
bool overwrite =
true);
48 void setLabelY(
const std::string &labelY,
bool overwrite =
true);
51 void setLabelZ(
const std::string &labelZ,
bool overwrite =
true);
54 void setBoundsX(
double minX,
double maxX,
bool overwrite =
true);
57 void setBoundsY(
double minY,
double maxY,
bool overwrite =
true);
60 void setRotation(
int elevation,
int azimuthal,
bool overwrite =
true);
68 std::pair<bool, std::string> title;
69 std::pair<bool, std::string> labelX;
70 std::pair<bool, std::string> labelY;
71 std::pair<bool, std::string> labelZ;
72 std::pair<bool, std::string> elevation;
73 std::pair<bool, std::string> azimuthal;
74 std::pair<bool, double> minX;
75 std::pair<bool, double> maxX;
76 std::pair<bool, double> minY;
77 std::pair<bool, double> maxY;
86 elevation(false,
"30"),
87 azimuthal(false,
"-60"),
96 const std::string &title,
99 if(overwrite || !this->title.first)
100 this->title = {
true, title};
104 const std::string &labelX,
107 if(overwrite || !this->labelX.first)
108 this->labelX = {
true, labelX};
112 const std::string &labelY,
115 if(overwrite || !this->labelY.first)
116 this->labelY = {
true, labelY};
120 const std::string &labelZ,
123 if(overwrite || !this->labelZ.first)
124 this->labelZ = {
true, labelZ};
132 if(overwrite || !this->elevation.first){
133 this->elevation = {
true, std::to_string(elevation)};
134 this->azimuthal = {
true, std::to_string(azimuthal)};
143 if(overwrite || !this->minX.first)
144 this->minX = {
true, minX};
145 if(overwrite || !this->maxX.first)
146 this->maxX = {
true, maxX};
154 if(overwrite || !this->minY.first)
155 this->minY = {
true, minY};
156 if(overwrite || !this->maxY.first)
157 this->maxY = {
true, maxY};
162 matplotlibcpp::title(title.second);
164 matplotlibcpp::xlabel(labelX.second);
166 matplotlibcpp::ylabel(labelY.second);
168 matplotlibcpp::view_init({
169 {
"elev", elevation.second},
170 {
"azim", azimuthal.second}
174 matplotlibcpp::xlim(minX.second, maxX.second);
176 matplotlibcpp::ylim(minY.second, maxY.second);
181 labelX = {
false,
""};
182 labelY = {
false,
""};
183 labelZ = {
false,
""};
184 elevation = {
false,
""};
185 azimuthal = {
false,
""};