mirror of
				https://github.com/aportelli/LatAnalyze.git
				synced 2025-11-04 08:04:32 +00:00 
			
		
		
		
	line plots
This commit is contained in:
		@@ -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:
 | 
			
		||||
 
 | 
			
		||||
		Reference in New Issue
	
	Block a user