1
0
mirror of https://github.com/aportelli/LatAnalyze.git synced 2024-11-10 00:45:36 +00:00

Title plot modifier

This commit is contained in:
Antonin Portelli 2014-03-17 14:57:46 +00:00
parent 4b522d3bee
commit 2fac88e7d2
2 changed files with 24 additions and 0 deletions

View File

@ -171,6 +171,17 @@ void PlotRange::operator()(PlotOptions &option) const
option.scale[a].max = max_;
}
// Title constructor ///////////////////////////////////////////////////////////
Title::Title(const string &title)
: title_(title)
{}
// Title modifier //////////////////////////////////////////////////////////////
void Title::operator()(PlotOptions &option) const
{
option.title = title_;
}
/******************************************************************************
* Plot implementation *
******************************************************************************/

View File

@ -162,6 +162,19 @@ private:
const double min_, max_;
};
class Title: public PlotModifier
{
public:
// constructor
explicit Title(const std::string &title);
// destructor
virtual ~Title(void) = default;
// modifier
virtual void operator()(PlotOptions &option) const;
private:
const std::string title_;
};
/******************************************************************************
* Plot class *
******************************************************************************/