mirror of
https://github.com/aportelli/LatAnalyze.git
synced 2025-04-29 09:05:55 +01:00
line plots
This commit is contained in:
parent
3918d3a9b8
commit
0bf6d8c8ae
@ -177,6 +177,24 @@ PlotData::PlotData(const XYStatData &data, const Index i, const Index j)
|
|||||||
setCommand("'" + tmpFileName + "' " + usingCmd);
|
setCommand("'" + tmpFileName + "' " + usingCmd);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// PlotLine constructor ////////////////////////////////////////////////////////
|
||||||
|
PlotLine::PlotLine(const DVec &x, const DVec &y)
|
||||||
|
{
|
||||||
|
if (x.size() != y.size())
|
||||||
|
{
|
||||||
|
LATAN_ERROR(Size, "x and y vector does not have the same size");
|
||||||
|
}
|
||||||
|
|
||||||
|
DMat d(x.size(), 2);
|
||||||
|
string usingCmd, tmpFileName;
|
||||||
|
|
||||||
|
d.col(0) = x;
|
||||||
|
d.col(1) = y;
|
||||||
|
tmpFileName = dumpToTmpFile(d);
|
||||||
|
pushTmpFile(tmpFileName);
|
||||||
|
setCommand("'" + tmpFileName + "' u 1:2 w lines");
|
||||||
|
}
|
||||||
|
|
||||||
// PlotHLine constructor ///////////////////////////////////////////////////////
|
// PlotHLine constructor ///////////////////////////////////////////////////////
|
||||||
PlotHLine::PlotHLine(const double y)
|
PlotHLine::PlotHLine(const double y)
|
||||||
{
|
{
|
||||||
|
@ -106,6 +106,15 @@ public:
|
|||||||
virtual ~PlotHLine(void) = default;
|
virtual ~PlotHLine(void) = default;
|
||||||
};
|
};
|
||||||
|
|
||||||
|
class PlotLine: public PlotObject
|
||||||
|
{
|
||||||
|
public:
|
||||||
|
// constructor
|
||||||
|
PlotLine(const DVec &x, const DVec &y);
|
||||||
|
// destructor
|
||||||
|
virtual ~PlotLine(void) = default;
|
||||||
|
};
|
||||||
|
|
||||||
class PlotBand: public PlotObject
|
class PlotBand: public PlotObject
|
||||||
{
|
{
|
||||||
public:
|
public:
|
||||||
|
Loading…
x
Reference in New Issue
Block a user