mirror of
https://github.com/aportelli/LatAnalyze.git
synced 2024-11-10 08:55:37 +00:00
plot data with points
This commit is contained in:
parent
adf2c9cc69
commit
60d91cbff5
@ -224,6 +224,24 @@ PlotLine::PlotLine(const DVec &x, const DVec &y)
|
|||||||
setCommand("'" + tmpFileName + "' u 1:2 w lines");
|
setCommand("'" + tmpFileName + "' u 1:2 w lines");
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// PlotPoints constructor ////////////////////////////////////////////////////////
|
||||||
|
PlotPoints::PlotPoints(const DVec &x, const DVec &y)
|
||||||
|
{
|
||||||
|
if (x.size() != y.size())
|
||||||
|
{
|
||||||
|
LATAN_ERROR(Size, "x and y vectors do 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");
|
||||||
|
}
|
||||||
|
|
||||||
// PlotHLine constructor ///////////////////////////////////////////////////////
|
// PlotHLine constructor ///////////////////////////////////////////////////////
|
||||||
PlotHLine::PlotHLine(const double y)
|
PlotHLine::PlotHLine(const double y)
|
||||||
{
|
{
|
||||||
|
@ -116,6 +116,15 @@ public:
|
|||||||
virtual ~PlotLine(void) = default;
|
virtual ~PlotLine(void) = default;
|
||||||
};
|
};
|
||||||
|
|
||||||
|
class PlotPoints: public PlotObject
|
||||||
|
{
|
||||||
|
public:
|
||||||
|
// constructor
|
||||||
|
PlotPoints(const DVec &x, const DVec &y);
|
||||||
|
// destructor
|
||||||
|
virtual ~PlotPoints(void) = default;
|
||||||
|
};
|
||||||
|
|
||||||
class PlotBand: public PlotObject
|
class PlotBand: public PlotObject
|
||||||
{
|
{
|
||||||
public:
|
public:
|
||||||
|
Loading…
Reference in New Issue
Block a user