dfm / corner.py

Make some beautiful corner plots
http://corner.readthedocs.io
BSD 2-Clause "Simplified" License
514 stars 228 forks source link

Tick fontsize control #102

Open cgcg10086 opened 7 years ago

cgcg10086 commented 7 years ago

Hello, On a corner plot with many variables, the axis tick labels overlap with the axis labels. I was wondering how to control the tick label's font size, or chose not to display them. Thank you!

dfm commented 7 years ago

This isn't really built into corner. Your best bet is probably to use matplotlib's rcParams.

PetMetz commented 6 years ago

Hello,

Thank you for bringing emcee and corner to the world!

I want to submit a corner plot with a publication I'm drafting, and am troubled by the same problem. I need a column-width figure to have >2 mm font size when typeset.

I can control axis label size using the label_kwargs keyword discussed in another ticket, but corner seems to be ignoring matplotlib's rcParams when setting the tick label size.

Has there been any more thought on this issue?

dfm commented 6 years ago

This code doesn't set the tick font size anywhere. Make sure that you're using the correct rc params and this will work. If it doesn't, then it's probably a bug with matplotlib :-)

boivinalex commented 5 years ago

Hello,

I had the same problem with tick labels overlapping axis labels when I made the labels a larger size for a publication. matplolib's subplots_adjust worked for me:

figure = corner.corner(...)
figure.subplots_adjust(right=1.5,top=1.5)

with

for ax in figure.get_axes():
    ax.tick_params(axis='both', labelsize=16)

I'm sure the rcParams figure.subplot.right and figure.subplot.top would also do the trick.

To save the figure without cutting things off I did:

figure.savefig(filepath,dpi=300,pad_inches=0.3,bbox_inches='tight')