mirror of
https://github.com/aportelli/LatAnalyze.git
synced 2025-04-11 03:20:46 +01:00
Plot: bands
This commit is contained in:
parent
7e3ab34a31
commit
b925a365e2
14
lib/Plot.cpp
14
lib/Plot.cpp
@ -183,6 +183,20 @@ PlotHLine::PlotHLine(const double y)
|
|||||||
setCommand(strFrom(y));
|
setCommand(strFrom(y));
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// PlotHBand constructor ///////////////////////////////////////////////////////
|
||||||
|
PlotBand::PlotBand(const double xMin, const double xMax, const double yMin,
|
||||||
|
const double yMax, const double opacity)
|
||||||
|
{
|
||||||
|
setCommand("'< printf \"%e %e\\n%e %e\\n%e %e\\n%e %e\\n%e %e\\n\" "
|
||||||
|
+ strFrom(xMin) + " " + strFrom(yMin) + " "
|
||||||
|
+ strFrom(xMax) + " " + strFrom(yMin) + " "
|
||||||
|
+ strFrom(xMax) + " " + strFrom(yMax) + " "
|
||||||
|
+ strFrom(xMin) + " " + strFrom(yMax) + " "
|
||||||
|
+ strFrom(xMin) + " " + strFrom(yMin)
|
||||||
|
+ "' u 1:2 w filledcurves closed fs solid " + strFrom(opacity)
|
||||||
|
+ " noborder");
|
||||||
|
}
|
||||||
|
|
||||||
// PlotFunction constructor ////////////////////////////////////////////////////
|
// PlotFunction constructor ////////////////////////////////////////////////////
|
||||||
PlotFunction::PlotFunction(const DoubleFunction &function, const double xMin,
|
PlotFunction::PlotFunction(const DoubleFunction &function, const double xMin,
|
||||||
const double xMax, const unsigned int nPoint)
|
const double xMax, const unsigned int nPoint)
|
||||||
|
10
lib/Plot.hpp
10
lib/Plot.hpp
@ -106,6 +106,16 @@ public:
|
|||||||
virtual ~PlotHLine(void) = default;
|
virtual ~PlotHLine(void) = default;
|
||||||
};
|
};
|
||||||
|
|
||||||
|
class PlotBand: public PlotObject
|
||||||
|
{
|
||||||
|
public:
|
||||||
|
// constructor
|
||||||
|
PlotBand(const double xMin, const double xMax, const double yMin,
|
||||||
|
const double yMax, const double opacity = 0.15);
|
||||||
|
// destructor
|
||||||
|
virtual ~PlotBand(void) = default;
|
||||||
|
};
|
||||||
|
|
||||||
class PlotFunction: public PlotObject
|
class PlotFunction: public PlotObject
|
||||||
{
|
{
|
||||||
public:
|
public:
|
||||||
|
Loading…
x
Reference in New Issue
Block a user