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:
parent
4b522d3bee
commit
2fac88e7d2
11
lib/Plot.cpp
11
lib/Plot.cpp
@ -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 *
|
||||
******************************************************************************/
|
||||
|
13
lib/Plot.hpp
13
lib/Plot.hpp
@ -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 *
|
||||
******************************************************************************/
|
||||
|
Loading…
Reference in New Issue
Block a user