GithubHelp home page GithubHelp logo

bug version 0.23.1? about chainconsumer HOT 9 CLOSED

MCostanzi avatar MCostanzi commented on August 13, 2024
bug version 0.23.1?

from chainconsumer.

Comments (9)

Samreay avatar Samreay commented on August 13, 2024

Hi Matteo,

That is an interesting issue, I have no idea why that is happening, especially if the other plot method is working. If you are able to zip up the example and chains I can test on my machine and see if there are any issues that jump out.

The posx and poxy issues Ive seen before from having NaNs or infs in the chains, but those issues are easy to find in the stacktrace because its normally the trace points to the histogram. Here I am actually very much confused, because from what I can see chainconsumer doesn't appear in the stacktrace at all!

from chainconsumer.

MCostanzi avatar MCostanzi commented on August 13, 2024

Hi,
thanks a lot for the quick reply.
Acatully, since I wanted to be sure that it was not a problem of my chains I used your example "plot_introduction.ipynb" to test it. So the code I'm using for the test is:

np.random.seed(0)
data = np.random.multivariate_normal([0.0, 4.0], [[1.0, 0.7], [0.7, 1.5]], size=10000)

c = ChainConsumer()
c.add_chain(data, parameters=["$x_1$", "$x_2$"])
fig = c.plotter.plot(figsize="column", truth=[0.0, 4.0])

(I've explicitly checked that there are no Nans in the data. Moreover, other library such as "corner" works with the same data vector)

from chainconsumer.

Samreay avatar Samreay commented on August 13, 2024

How odd, that code definitely works, so Im wondering if it is an issue with the environment (ah yes, now I see your original sentence highlighting it was an intro example!)

Can you confirm that you get the same error if you download the pure python code and run it, or if it only happens with the ipython environment?

from chainconsumer.

MCostanzi avatar MCostanzi commented on August 13, 2024

Mmm, interesting.
So I tried to use the pure python code.
If I just ask to display the plot, i.e.:

fig = c.plotter.plot(display=True, figsize="column", truth=[0.0, 4.0])

I have no problem

If instead I try to save it:

fig = c.plotter.plot(filename="/home/costanzi/Desktop/test.png", figsize="column", truth=[0.0, 4.0])

I got the same error.

from chainconsumer.

Samreay avatar Samreay commented on August 13, 2024

from chainconsumer.

MCostanzi avatar MCostanzi commented on August 13, 2024

I see, I'll try to do these updates.

Thanks a lot!

from chainconsumer.

Samreay avatar Samreay commented on August 13, 2024

Seems like there is a bug in the latest version of matplotlib which is affecting many users. Ive updated CC to force a good matplotlib version, so please update cc and hopefully all the posx posy issues will disappear and youll be able to save figures again.

from chainconsumer.

MCostanzi avatar MCostanzi commented on August 13, 2024

Great, it works again now! Thanks a lot :)

from chainconsumer.

Samreay avatar Samreay commented on August 13, 2024

Glad it worked!

from chainconsumer.

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.