Closed tarjebargheer closed 6 years ago
You added build/bindings/python/dionysus/plot.py
. I think you want it without build
. Please fix that, and I'll look at the actual diff.
BTW, you can add labels with the existing code as follows:
import dionysus as d
import matplotlib.pyplot as plt
d.plot.plot_diagram(dgms[1])
plt.axes().set_xlabel("birth")
plt.axes().set_ylabel("death")
plt.show()
When I do that on the existing code using matplotlib 2.1.2, I get the following Deprecation Warning:
MatplotlibDeprecationWarning: Adding an axes using the same arguments as a previous axes currently reuses the earlier instance. In a future version, a new instance will always be created and returned. Meanwhile, this warning can be suppressed, and the future behavior ensured, by passing a unique label to each axes instance. warnings.warn(message, mplDeprecation, stacklevel=1)
so I modified the code with the plotting routines running on the specifix axis in matplotlib - which might not be necessary before these matplotlib changes are implemented... staying close to your original code is fine with me... I will remove the build/ pull request as well
Thanks, I have tried to follow your requests - and it should probably be better at handling the upcoming deprecation. apparently, colorbar takes the axes through an ax parameter and lives on the figure.
Looks good. Thanks. Merging.
For pitching persistent homology to some clients, I thought it would look better with labels on some of the plots. Feel free to use if desired - I have also modified the code to handle deprecation warnings of matplotlib (specified handles on the axis objects that are used instead of plt directly)