Code Monkey home page Code Monkey logo

Comments (8)

beew avatar beew commented on June 14, 2024 1

Hi, I ran into the same issue when I ran the code in spyder (also Ubuntu 22.04). Turns out it works in Jupyter notebook. Looks like somehow the plotting method is written for notebook.

#661

from giotto-tda.

VascoSch92 avatar VascoSch92 commented on June 14, 2024 1

Looking at the code: the method is giving back a fig but it is not displaying it (this is what happens automatically on a notebook)

Try with

plot_diagram(diagrams[i]).show()

Or

print(plot_diagram(diagrams[i]))

from giotto-tda.

matteocao avatar matteocao commented on June 14, 2024 1

@ghoshanirban we do not currently have the feature you mention: we would gladly accept a PR from you adding this if you are interested however!

from giotto-tda.

ghoshanirban avatar ghoshanirban commented on June 14, 2024

Looking at the code: the method is giving back a fig but it is not displaying it (this is what happens automatically on a notebook)

Try with

plot_diagram(diagrams[i]).show()

Or

print(plot_diagram(diagrams[i]))

Thank you; show() worked with PyCharm and the plot got opened in a browser window.
Matplotlib support would have been great.
Any ideas on how to use it in this case?

from giotto-tda.

VascoSch92 avatar VascoSch92 commented on June 14, 2024

The method name is really bad because it is not plotting but returning a plot, and then you have to plot it. I will suggest to rename that as get_diagram, generate_diagram, ....

Matplotlib support would have been great.
Any ideas on how to use it in this case?

What do you mean? Can you give some more details or an user-case? :-)

from giotto-tda.

ghoshanirban avatar ghoshanirban commented on June 14, 2024

I wondered if the plot can be exported to a pdf generated using Matplotlib.

from giotto-tda.

VascoSch92 avatar VascoSch92 commented on June 14, 2024

Give a look here. :-)

And here there is the documentation on matplotlib.

from giotto-tda.

ghoshanirban avatar ghoshanirban commented on June 14, 2024

Thanks! I was expecting gudhi-like support:

gudhi.plot_persistence_barcode(barcodes)
plt.savefig("persistence-barcode.pdf", format="pdf", bbox_inches="tight")

Do we have this kind of support for giotto-tda?

from giotto-tda.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.