question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Top and bottom of the corner plot seem clipped

See original GitHub issue

Hello,

I apologize if this seem to be an easy fix. My corner plot (attached) somehow is not displaying normally. The top and the bottom seemed to be clipped. Because of that, some of the percentiles above the histograms at the top can’t be seen and at the bottom, the axis labels are fighting with the axis tick marks. I tried to adjust the figure size but doesn’t seem to work. Could someone please share some ideas of what’s going on here? Thanks.

corner15-1.pdf

Here’s my code used to create this plot.

mpl.rcParams['axes.labelsize'] = 7 title_dict = {} title_dict['fontsize'] = 7 labels = [r'$P_1$',r'$P_2$',r'$m_1$',r'$m_2$',r'$\lambda_1$',r'$\lambda_2$',\ r'$e_1$sin$\omega_1$',r'$e_2$sin$\omega_2$',r'$e_1$cos$\omega_1$',\ r'$e_2$cos$\omega_2$',r'$\sigma_{HARPS1}$',r'$\sigma_{HARPS2}$',\ r'$\sigma_{HIRES}$']

figf = corner.corner(samplesf,show_titles=True,quantiles=[0.16,0.5,0.84],\
                     labels=labels,title_kwargs=title_dict,smooth=True)

for ax in figf.get_axes():
    ax.tick_params(axis='both', labelsize=5)
#fig1.tight_layout()
figf.savefig(path+'cornerall.pdf',dpi=500)`

Issue Analytics

  • State:closed
  • Created a year ago
  • Comments:13 (6 by maintainers)

github_iconTop GitHub Comments

1reaction
zhexinglicommented, Jun 24, 2022

Ok thanks. I’m not sure what changed the default rcparams settings. I’ll see if I can change them back to default.

0reactions
zhexinglicommented, Jun 25, 2022

and I believe this could explain some of other questions people raised about labels overlapping in the plot.

Glad it finally worked and happy my solution could be helpful to the community 😃

Read more comments on GitHub >

github_iconTop Results From Across the Web

matplotlib/seaborn: first and last row cut in half of heatmap plot
Unfortunately matplotlib 3.1.1 broke seaborn heatmaps; and in general inverted axes with fixed ticks. This is fixed in the current ...
Read more >
What does a property corner look like? - Cardinal Surveying
When a boundary survey is performed by a licensed land surveyor, part of the surveying process is to find, locate, expose, and set...
Read more >
Line Markers are cut off at edge of plot area #826 - GitHub
... shows that the markers at the edge of the plot get 'cut off' by the top, bottom, and sides of the plot,...
Read more >
Borders or edge of drawing are cut off when plotting or ...
When plotting from AutoCAD, one or more edges of the drawing are cut off, cropped, or lost in the output PDF. The drawing...
Read more >
How can I fix an Inset plot to the top right corner of the main plot?
However, if I add PlotLabel -> "Test" then the inset gets clipped at the top. Looks like Top refers to the top of...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found