mirror of
https://github.com/aportelli/LatAnalyze.git
synced 2025-04-10 19:20:44 +01: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_;
|
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 *
|
* Plot implementation *
|
||||||
******************************************************************************/
|
******************************************************************************/
|
||||||
|
13
lib/Plot.hpp
13
lib/Plot.hpp
@ -162,6 +162,19 @@ private:
|
|||||||
const double min_, max_;
|
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 *
|
* Plot class *
|
||||||
******************************************************************************/
|
******************************************************************************/
|
||||||
|
Loading…
x
Reference in New Issue
Block a user