mirror of
https://github.com/aportelli/LatAnalyze.git
synced 2024-11-10 00:45:36 +00: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);
|
||||
}
|
||||
|
||||
// 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::PlotHLine(const double y)
|
||||
{
|
||||
|
@ -106,6 +106,15 @@ public:
|
||||
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
|
||||
{
|
||||
public:
|
||||
|
Loading…
Reference in New Issue
Block a user