From 82c1b234377668f3b01e794f6dcf4f72b4457642 Mon Sep 17 00:00:00 2001 From: benhid Date: Wed, 8 Jan 2020 16:44:34 +0100 Subject: [PATCH] Figure only shows when filename is not specified --- jmetal/lab/visualization/plotting.py | 9 ++++++--- 1 file changed, 6 insertions(+), 3 deletions(-) diff --git a/jmetal/lab/visualization/plotting.py b/jmetal/lab/visualization/plotting.py index 0c5d9158..dce85dc7 100644 --- a/jmetal/lab/visualization/plotting.py +++ b/jmetal/lab/visualization/plotting.py @@ -113,8 +113,9 @@ def two_dim(self, fronts: List[list], labels: List[str] = None, filename: str = if filename: plt.savefig(filename + '.' + format, format=format, dpi=200) + else: + plt.show() - plt.show() plt.close(fig=fig) def three_dim(self, fronts: List[list], labels: List[str] = None, filename: str = None, format: str = 'eps'): @@ -153,8 +154,9 @@ def three_dim(self, fronts: List[list], labels: List[str] = None, filename: str if filename: plt.savefig(filename + '.' + format, format=format, dpi=1000) + else: + plt.show() - plt.show() plt.close(fig=fig) def pcoords(self, fronts: List[list], normalize: bool = False, filename: str = None, format: str = 'eps'): @@ -186,6 +188,7 @@ def pcoords(self, fronts: List[list], normalize: bool = False, filename: str = N if filename: plt.savefig(filename + '.' + format, format=format, dpi=1000) + else: + plt.show() - plt.show() plt.close(fig=fig)