Giter Club home page Giter Club logo

Comments (2)

dmentipl avatar dmentipl commented on June 18, 2024

Hi @joshcalcino, thanks for raising this issue.

Which version of Plonk are you using? You can get this by printing plonk.__version__.

I have released a new version of Plonk (v0.5.0) today. In this version I have removed the Visualization class in favour of a function (plonk.visualize.plot) that returns a Matplotlib Axes object. I think this makes the code simpler, and more general. And it's easier for the user who might be already familiar with Matplotlib.

I've tested your code with v0.5.0 and it works as expected.

Also another thing I noticed in the documentation for plonk.visualize.plot, it states it returns a matplotlib axes object:

On readthedocs there are two versions: one that is pinned to the most recent release installable via pip or conda (https://plonk.readthedocs.io/en/stable/) which is called "stable" and one that is the current master branch of the development version on GitHub (https://plonk.readthedocs.io/en/latest/) that is called "latest". I think you were looking at the development version, i.e. "latest", not the "stable" one.

I am also wondering if it is possible to make the plot_object object available to the user somehow in the above object, or make it accessible some other way.

I guess now that there is no Visualization object you can just access the required Matplotlib objects via the Axes object. (Although you could do this previously.) For example, to change the colorbar range:

ax = plonk.visualize.plot(snap=snap, quantity='density')
im = ax.images[0]
im.set_clim(vmax=1/137)

Let me know what you think.

from plonk.

dmentipl avatar dmentipl commented on June 18, 2024

Hi @joshcalcino , let me know if you have any more questions or concerns regarding this issue. If not, I'll close the issue.

from plonk.

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.