Skip to content

Commit

Permalink
Clicking anywhere in display window advances to the next iteration by…
Browse files Browse the repository at this point in the history
… default
  • Loading branch information
tkralphs committed Apr 2, 2020
1 parent 7473466 commit a498e5c
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 3 deletions.
2 changes: 1 addition & 1 deletion setup.py
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
import setuptools

setup(name='coinor.grumpy',
version='0.9.2',
version='0.9.3',
description='Graphics for Understanding Mathematical Programming (GrUMPy)',
long_description='''GrUMPy is a class for visualizing various algorithm used in solving discrete optimization problem. It has a class for dynamically generating and visualizing branch-and-bound trees that is derived from the GiMPy graph class. Using the branch-and-bound class, a user can visualize the branch-and-bound process in a number of different ways either by building the tree dynamically through direct calls to Python from the solver or by piping the output of an instrumented solver to GrUMPy for parsing. The branch-and-bound class also includes a pure Python implementation of branch and bound that is targeted at educational use.
Expand Down
10 changes: 8 additions & 2 deletions src/grumpy/polyhedron2D.py
Original file line number Diff line number Diff line change
Expand Up @@ -316,9 +316,15 @@ def set_xlim(self, xlim):
def set_ylim(self, ylim):
self.ax.set_ylim(ylim)

def show(self):
def show(self, pause = True, wait_for_click = True):
plt.legend()
plt.show()
if wait_for_click == True:
plt.draw()
if plt.waitforbuttonpress(timeout = 10000):
plt.close()
exit()
else:
plt.show(block=pause)
self.fig = None

if __name__ == '__main__':
Expand Down

0 comments on commit a498e5c

Please sign in to comment.