mirror of
https://github.com/aportelli/LatAnalyze.git
synced 2025-05-01 01:25:56 +01:00
matrix heatmap plot
This commit is contained in:
parent
41ea5c984e
commit
f83ee5bf6c
@ -247,6 +247,14 @@ PlotHistogram::PlotHistogram(const Histogram &h)
|
|||||||
setCommand("'" + tmpFileName + "' u 1:2 w steps");
|
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 *
|
* Plot modifiers *
|
||||||
******************************************************************************/
|
******************************************************************************/
|
||||||
|
22
lib/Plot.hpp
22
lib/Plot.hpp
@ -49,11 +49,11 @@ public:
|
|||||||
// destructor
|
// destructor
|
||||||
virtual ~PlotObject(void) = default;
|
virtual ~PlotObject(void) = default;
|
||||||
// access
|
// access
|
||||||
std::string popTmpFile(void);
|
std::string popTmpFile(void);
|
||||||
const std::string & getCommand(void) const;
|
const std::string & getCommand(void) const;
|
||||||
const std::string & getHeadCommand(void) const;
|
const std::string & getHeadCommand(void) const;
|
||||||
// test
|
// test
|
||||||
bool gotTmpFile(void) const;
|
bool gotTmpFile(void) const;
|
||||||
protected:
|
protected:
|
||||||
// access
|
// access
|
||||||
void pushTmpFile(const std::string &fileName);
|
void pushTmpFile(const std::string &fileName);
|
||||||
@ -138,6 +138,20 @@ public:
|
|||||||
virtual ~PlotHistogram(void) = default;
|
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 *
|
* Plot modifiers *
|
||||||
******************************************************************************/
|
******************************************************************************/
|
||||||
|
Loading…
x
Reference in New Issue
Block a user