Giter Club home page Giter Club logo

Comments (6)

kbarbary avatar kbarbary commented on July 24, 2024

Assuming you're running the example block under "Usage" in the README.rst, I can't reproduce this error. I'm on Ubuntu, using conda, python 2.7.11, numpy=1.10.2, matplotlib=1.5.0.

from corner.py.

BordeauxDave avatar BordeauxDave commented on July 24, 2024

Le 06/01/2016 20:04, Kyle Barbary a écrit :

Assuming you're running the example block under "Usage" in the
README.rst, I can't reproduce this error. I'm on Ubuntu, using conda,
python 2.7.11, numpy=1.10.2, matplotlib=1.5.0.

Well, thank you for trying. I am indeed doing:

import numpy as np
import corner

ndim, nsamples = 5, 10000
samples = np.random.randn(ndim * nsamples).reshape([nsamples, ndim])
figure = corner.corner(samples)
figure.savefig("corner.png")

to which I add that

corner.version
u'1.0.0'

np.version
'1.10.1'
Any other suggestions are welcome, David.

from corner.py.

BordeauxDave avatar BordeauxDave commented on July 24, 2024

Progress! Two things...

  1. I execute to completion without errors, but with contour-less plots, by changing the line to
    corner.corner(samples, plot_contours=False)

  2. Towards the end of corner.py, the contours array V is created:
    V = np.empty(len(levels))
    for i, v0 in enumerate(levels):
    try:
    V[i] = Hflat[sm <= v0][-1]
    except:
    V[i] = Hflat[0]

A print of "levels" shows that it is ascending. But V is descending!
I added a few lines:
print (" das corner VVVVV: ", V)
V = V[::-1]
print (" das corner VVVVV: ", V)
and here is a sample of what goes to my screen:
das corner VVVVV: [ 196. 140. 71. 29.]
das corner VVVVV: [ 29. 71. 140. 196.]

With this reverse of V,
corner.corner(samples, plot_contours=True)
now works nicely.

I will leave it to you experts to understand why V is okay on some systems but not on mine!
Thank you for listening, David.

from corner.py.

dfm avatar dfm commented on July 24, 2024

This error was added in matplotlib 1.5.1 because of a bug in all versions of contourf prior to 1.5.0. See #65 for the relevant issue. It's not quite as simple as just sorting the levels.

from corner.py.

dfm avatar dfm commented on July 24, 2024

This should be fixed in version 1.0.1 (see #70). Give it a shot.

from corner.py.

BordeauxDave avatar BordeauxDave commented on July 24, 2024

Yes! my problem is indeed resolved. Thanks again to all, David.

from corner.py.

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.