Skip to content

Commit

Permalink
Figure only shows when filename is not specified
Browse files Browse the repository at this point in the history
  • Loading branch information
benhid committed Jan 8, 2020
1 parent 2380d33 commit 82c1b23
Showing 1 changed file with 6 additions and 3 deletions.
9 changes: 6 additions & 3 deletions jmetal/lab/visualization/plotting.py
Original file line number Diff line number Diff line change
Expand Up @@ -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'):
Expand Down Expand Up @@ -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'):
Expand Down Expand Up @@ -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)

0 comments on commit 82c1b23

Please sign in to comment.