mirror of
https://github.com/aportelli/LatAnalyze.git
synced 2025-05-03 10:05: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 *
|
||||||
******************************************************************************/
|
******************************************************************************/
|
||||||
|
14
lib/Plot.hpp
14
lib/Plot.hpp
@ -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