23 #ifndef COM_DAFER45_TBTK_VISUALIZATION_MAT_PLOT_LIB_PLOT_PARAMETERS
24 #define COM_DAFER45_TBTK_VISUALIZATION_MAT_PLOT_LIB_PLOT_PARAMETERS
26 #include "TBTK/Visualization/MatPlotLib/matplotlibcpp.h"
32 namespace Visualization{
41 void setTitle(
const std::string &title,
bool overwrite =
true);
44 void setLabelX(
const std::string &labelX,
bool overwrite =
true);
47 void setLabelY(
const std::string &labelY,
bool overwrite =
true);
50 void setBoundsX(
double minX,
double maxX,
bool overwrite =
true);
53 void setBoundsY(
double minY,
double maxY,
bool overwrite =
true);
61 std::pair<bool, std::string> title;
62 std::pair<bool, std::string> labelX;
63 std::pair<bool, std::string> labelY;
64 std::pair<bool, double> minX;
65 std::pair<bool, double> maxX;
66 std::pair<bool, double> minY;
67 std::pair<bool, double> maxY;
83 if(overwrite || !this->title.first)
84 this->title = {
true, title};
88 const std::string &labelX,
91 if(overwrite || !this->labelX.first)
92 this->labelX = {
true, labelX};
96 const std::string &labelY,
99 if(overwrite || !this->labelY.first)
100 this->labelY = {
true, labelY};
108 if(overwrite || !this->minX.first)
109 this->minX = {
true, minX};
110 if(overwrite || !this->maxX.first)
111 this->maxX = {
true, maxX};
119 if(overwrite || !this->minY.first)
120 this->minY = {
true, minY};
121 if(overwrite || !this->maxY.first)
122 this->maxY = {
true, maxY};
127 matplotlibcpp::title(title.second);
129 matplotlibcpp::xlabel(labelX.second);
131 matplotlibcpp::ylabel(labelY.second);
133 matplotlibcpp::xlim(minX.second, maxX.second);
135 matplotlibcpp::ylim(minY.second, maxY.second);
140 labelX = {
false,
""};
141 labelY = {
false,
""};