corner.py icon indicating copy to clipboard operation
corner.py copied to clipboard

Tick fontsize control

Open cgcg10086 opened this issue 8 years ago • 4 comments

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!

cgcg10086 avatar Jun 27 '17 05:06 cgcg10086

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

dfm avatar Jul 11 '17 21:07 dfm

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?

PetMetz avatar May 18 '18 16:05 PetMetz

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 :-)

dfm avatar May 19 '18 12:05 dfm

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')

boivinalex avatar Oct 18 '19 19:10 boivinalex