Skip to content

Commit

Permalink
#154: Added return figure. Removed sample figure
Browse files Browse the repository at this point in the history
  • Loading branch information
JoschD committed Oct 15, 2018
1 parent 6412767 commit abc0e5f
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 1 deletion.
4 changes: 3 additions & 1 deletion figure_editor.py
Original file line number Diff line number Diff line change
Expand Up @@ -31,10 +31,12 @@ def main(fig=None):
form = MainWindow(fig)
form.show()
app.exec_()
return form.get_figure()


# Script Mode #################################################################


if __name__ == "__main__":
main(_quick_figure())
# main(_quick_figure())
main()
4 changes: 4 additions & 0 deletions plotshop/fig_editor/main_window.py
Original file line number Diff line number Diff line change
Expand Up @@ -374,3 +374,7 @@ def update_figure(self, figure=None):
self.canvas.set_pickers(self.picktol)
self.canvas.draw()

def get_figure(self):
""" Return the currently used figure. """
return self.canvas.figure

0 comments on commit abc0e5f

Please sign in to comment.