Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Remove the 1D histograms #166

Open
rustomB opened this issue May 12, 2021 · 3 comments
Open

Remove the 1D histograms #166

rustomB opened this issue May 12, 2021 · 3 comments

Comments

@rustomB
Copy link

rustomB commented May 12, 2021

I just want the confidence level plot, and hence I am trying to remove the 1D histograms using corner.corner().
Unfortunately I could not do it yet. Can it be done by simply changing any argument?

Thanks in advance.

@dfm
Copy link
Owner

dfm commented May 12, 2021

There is no built in feature for this, but I bet you could follow the custom plotting tutorial to extract the relevant axes and clear them manually.

@alex-c-jenkins
Copy link

alex-c-jenkins commented May 18, 2021

Stumbled upon this thread as I was trying to do the same thing. I managed it in the end like so:

axes = np.array(fig.axes).reshape((ndim, ndim))
for a in axes[np.triu_indices(ndim)]:
a.remove()

Just thought I'd share in case that's useful @rustomB .

@ChenSun-Phys
Copy link

For anyone who has stumbled upon this thread, you can add bbox_inches='tight' to your plt.savefig() to remove the white padding that's left after removing the axes. Keep in mind that newer versions of matplotlib might require bbox_inches=0.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

4 participants