From 11d9aa4747ec2fd2a430cc6bf52d3e4f7f76799b Mon Sep 17 00:00:00 2001 From: Antonin Portelli Date: Wed, 6 Apr 2016 18:38:37 +0100 Subject: [PATCH] matrix heatmap plot range fix --- lib/Plot.hpp | 14 ++++++++++++++ 1 file changed, 14 insertions(+) diff --git a/lib/Plot.hpp b/lib/Plot.hpp index 57ffe65..6e2fdec 100644 --- a/lib/Plot.hpp +++ b/lib/Plot.hpp @@ -136,6 +136,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, (m).rows() - .5, -.5) <<\ +PlotMatrixNoRange(m) + /****************************************************************************** * Plot modifiers * ******************************************************************************/