mirror of
				https://github.com/aportelli/LatAnalyze.git
				synced 2025-11-04 08:04:32 +00:00 
			
		
		
		
	matrix heatmap plot
This commit is contained in:
		@@ -247,6 +247,14 @@ PlotHistogram::PlotHistogram(const Histogram &h)
 | 
			
		||||
    setCommand("'" + tmpFileName + "' u 1:2 w steps");
 | 
			
		||||
}
 | 
			
		||||
 | 
			
		||||
// PlotMatrixNoRange constructor ///////////////////////////////////////////////
 | 
			
		||||
PlotMatrixNoRange::PlotMatrixNoRange(const DMat &m)
 | 
			
		||||
{
 | 
			
		||||
    string tmpFileName = dumpToTmpFile(m);
 | 
			
		||||
    
 | 
			
		||||
    setCommand("'" + tmpFileName + "' matrix w image");
 | 
			
		||||
}
 | 
			
		||||
 | 
			
		||||
/******************************************************************************
 | 
			
		||||
 *                             Plot modifiers                                 *
 | 
			
		||||
 ******************************************************************************/
 | 
			
		||||
 
 | 
			
		||||
							
								
								
									
										22
									
								
								lib/Plot.hpp
									
									
									
									
									
								
							
							
						
						
									
										22
									
								
								lib/Plot.hpp
									
									
									
									
									
								
							@@ -49,11 +49,11 @@ public:
 | 
			
		||||
    // destructor
 | 
			
		||||
    virtual ~PlotObject(void) = default;
 | 
			
		||||
    // access
 | 
			
		||||
    std::string                 popTmpFile(void);
 | 
			
		||||
    const std::string &         getCommand(void) const;
 | 
			
		||||
    const std::string &         getHeadCommand(void) const;
 | 
			
		||||
    std::string         popTmpFile(void);
 | 
			
		||||
    const std::string & getCommand(void) const;
 | 
			
		||||
    const std::string & getHeadCommand(void) const;
 | 
			
		||||
    // test
 | 
			
		||||
    bool                        gotTmpFile(void) const;
 | 
			
		||||
    bool                gotTmpFile(void) const;
 | 
			
		||||
protected:
 | 
			
		||||
    // access
 | 
			
		||||
    void pushTmpFile(const std::string &fileName);
 | 
			
		||||
@@ -138,6 +138,20 @@ public:
 | 
			
		||||
    virtual ~PlotHistogram(void) = default;
 | 
			
		||||
};
 | 
			
		||||
 | 
			
		||||
class PlotMatrixNoRange: public PlotObject
 | 
			
		||||
{
 | 
			
		||||
public:
 | 
			
		||||
    // constructor
 | 
			
		||||
    PlotMatrixNoRange(const DMat &m);
 | 
			
		||||
    // destructor
 | 
			
		||||
    virtual ~PlotMatrixNoRange(void) = default;
 | 
			
		||||
};
 | 
			
		||||
 | 
			
		||||
#define PlotMatrix(m)\
 | 
			
		||||
PlotRange(Axis::x, -.5, (m).cols() - .5) <<\
 | 
			
		||||
PlotRange(Axis::y, -.5, (m).rows() - .5) <<\
 | 
			
		||||
PlotMatrixNoRange(m)
 | 
			
		||||
 | 
			
		||||
/******************************************************************************
 | 
			
		||||
 *                             Plot modifiers                                 *
 | 
			
		||||
 ******************************************************************************/
 | 
			
		||||
 
 | 
			
		||||
		Reference in New Issue
	
	Block a user