From 4029b4223dba97e7ea4b6ba59ce691bb6d4baae3 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Petr=C3=B4nio=20C=C3=A2ndido=20de=20Lima=20e=20Silva?= Date: Tue, 27 Nov 2018 12:52:52 -0200 Subject: [PATCH] Adding rounding parameter at partitioner.plot --- pyFTS/partitioners/partitioner.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/pyFTS/partitioners/partitioner.py b/pyFTS/partitioners/partitioner.py index 820f6a8..ee530a3 100644 --- a/pyFTS/partitioners/partitioner.py +++ b/pyFTS/partitioners/partitioner.py @@ -104,7 +104,7 @@ class Partitioner(object): """ return self.sets[self.ordered_sets[-1]] - def plot(self, ax): + def plot(self, ax, rounding=0): """ Plot the partitioning using the Matplotlib axis ax @@ -122,7 +122,7 @@ class Partitioner(object): elif s.type == 'composite': for ss in s.sets: self.plot_set(ax, ss) - ticks.append(str(round(s.centroid,0))+'\n'+s.name) + ticks.append(str(round(s.centroid,rounding))+'\n'+s.name) x.append(s.centroid) ax.xaxis.set_ticklabels(ticks) ax.xaxis.set_ticks(x)