-
Notifications
You must be signed in to change notification settings - Fork 55
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
add pyplot savefig() #25
base: master
Are you sure you want to change the base?
Conversation
Codecov Report
@@ Coverage Diff @@
## master #25 +/- ##
==========================================
- Coverage 80.03% 79.73% -0.31%
==========================================
Files 10 10
Lines 531 533 +2
Branches 105 106 +1
==========================================
Hits 425 425
- Misses 78 79 +1
- Partials 28 29 +1
Continue to review full report at Codecov.
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Sorry it took me so long to circle back about this. Address the couple of comments regarding the arguments and I'll merge asap.
@@ -175,6 +178,9 @@ def plot_diagrams( | |||
if show is True: | |||
plt.show() | |||
|
|||
if save is True: | |||
plt.savefig(figures_directory + filename) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Could you change it to only accept one argument, filename
please.
ax=None, | ||
save=False, | ||
figures_directory=None, | ||
filename=None |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Do you need both save
and filename
? How about if filename is not None
, then save to the filename
I am using Ripser.py alongside a Docker container running all the python stuff. This makes plotting tricky if at all possible. The workaround is simply to use pyplot.savefig() and save the plots as files.
This pull request is a naive and humble attempt to enable figure saving functionality to Ripser.py. Suggestions, edits and/ or corrections are welcome.