mirror of
https://github.com/aportelli/LatAnalyze.git
synced 2025-04-11 03:20:46 +01:00
object to plot single point
This commit is contained in:
parent
f0c3fd4d7d
commit
7fd31d1fcc
@ -206,6 +206,60 @@ PlotData::PlotData(const XYStatData &data, const Index i, const Index j, const b
|
|||||||
setCommand("'" + tmpFileName + "' " + usingCmd);
|
setCommand("'" + tmpFileName + "' " + usingCmd);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// PlotPoint constructor ///////////////////////////////////////////////////////
|
||||||
|
PlotPoint::PlotPoint(const double x, const double y)
|
||||||
|
{
|
||||||
|
DMat d(1, 2);
|
||||||
|
string usingCmd, tmpFileName;
|
||||||
|
|
||||||
|
d(0, 0) = x;
|
||||||
|
d(0, 1) = y;
|
||||||
|
tmpFileName = dumpToTmpFile(d);
|
||||||
|
pushTmpFile(tmpFileName);
|
||||||
|
setCommand("'" + tmpFileName + "' u 1:2");
|
||||||
|
}
|
||||||
|
|
||||||
|
PlotPoint::PlotPoint(const DSample &x, const double y)
|
||||||
|
{
|
||||||
|
DMat d(1, 3);
|
||||||
|
string usingCmd, tmpFileName;
|
||||||
|
|
||||||
|
d(0, 0) = x[central];
|
||||||
|
d(0, 2) = y;
|
||||||
|
d(0, 1) = sqrt(x.variance());
|
||||||
|
tmpFileName = dumpToTmpFile(d);
|
||||||
|
pushTmpFile(tmpFileName);
|
||||||
|
setCommand("'" + tmpFileName + "' u 1:3:2 w xerr");
|
||||||
|
}
|
||||||
|
|
||||||
|
PlotPoint::PlotPoint(const double x, const DSample &y)
|
||||||
|
{
|
||||||
|
DMat d(1, 3);
|
||||||
|
string usingCmd, tmpFileName;
|
||||||
|
|
||||||
|
d(0, 0) = x;
|
||||||
|
d(0, 1) = y[central];
|
||||||
|
d(0, 2) = sqrt(y.variance());
|
||||||
|
tmpFileName = dumpToTmpFile(d);
|
||||||
|
pushTmpFile(tmpFileName);
|
||||||
|
setCommand("'" + tmpFileName + "' u 1:2:3 w yerr");
|
||||||
|
}
|
||||||
|
|
||||||
|
PlotPoint::PlotPoint(const DSample &x, const DSample &y)
|
||||||
|
{
|
||||||
|
DMat d(1, 4);
|
||||||
|
string usingCmd, tmpFileName;
|
||||||
|
|
||||||
|
d(0, 0) = x[central];
|
||||||
|
d(0, 2) = y[central];
|
||||||
|
d(0, 1) = sqrt(x.variance());
|
||||||
|
d(0, 3) = sqrt(y.variance());
|
||||||
|
tmpFileName = dumpToTmpFile(d);
|
||||||
|
pushTmpFile(tmpFileName);
|
||||||
|
setCommand("'" + tmpFileName + "' u 1:3:2:4 w xyerr");
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
// PlotLine constructor ////////////////////////////////////////////////////////
|
// PlotLine constructor ////////////////////////////////////////////////////////
|
||||||
PlotLine::PlotLine(const DVec &x, const DVec &y)
|
PlotLine::PlotLine(const DVec &x, const DVec &y)
|
||||||
{
|
{
|
||||||
|
@ -98,6 +98,18 @@ public:
|
|||||||
virtual ~PlotData(void) = default;
|
virtual ~PlotData(void) = default;
|
||||||
};
|
};
|
||||||
|
|
||||||
|
class PlotPoint: public PlotObject
|
||||||
|
{
|
||||||
|
public:
|
||||||
|
// constructor
|
||||||
|
PlotPoint(const double x, const double y);
|
||||||
|
PlotPoint(const DSample &x, const double y);
|
||||||
|
PlotPoint(const double x, const DSample &y);
|
||||||
|
PlotPoint(const DSample &x, const DSample &y);
|
||||||
|
// destructor
|
||||||
|
virtual ~PlotPoint(void) = default;
|
||||||
|
};
|
||||||
|
|
||||||
class PlotHLine: public PlotObject
|
class PlotHLine: public PlotObject
|
||||||
{
|
{
|
||||||
public:
|
public:
|
||||||
|
Loading…
x
Reference in New Issue
Block a user