## GetDist: pad in triangle plots

Use of Healpix, camb, CLASS, cosmomc, compilers, etc.
Jacopo Chevallard
Posts: 3
Joined: January 28 2011
Affiliation: ESA-ESTEC

### GetDist: pad in triangle plots

Hi, is there a simple way to add padding (i.e. white space) between the different subplots in a triangle plot?

The reason is that in the case of plots like the one below, the lack of pad creates confusion, because of multiple 2D contours reaching the edges of the prior.

Cheers, and congrats for the great work in GetDist (and for the KDE notes which I appreciated a lot)

Antony Lewis
Posts: 1551
Joined: September 23 2004
Affiliation: University of Sussex
Contact:

### Re: GetDist: pad in triangle plots

You can try setting

Code: Select all

g.settings.no_triangle_axis_labels=False
(where g is the plotting instance). But it may be better just to re-order your parameter names given to triangle_plot so that on of the plots with prior edges is at the bottom.

Jacopo Chevallard
Posts: 3
Joined: January 28 2011
Affiliation: ESA-ESTEC

### GetDist: pad in triangle plots

Hi Antony, thanks for the prompt reply.

Turning on axis labels is not optimal, as it will just add a lot of useless information and take space from the plots themselves.

And solution #2 is not applicable in my case, I have several thousands of plots, and each one can have different parameters showing this kind of problem (and clearly I don't want to change the parameters ordering among the plots).

Apparently this is the way to go

Code: Select all

fig.subplots_adjust&#40;wspace=0.5, hspace=0.5&#41;
which is a method in figure, or a function in pyplot
• matplotlib.figure.Figure.subplots_adjust (Python method, in figure)
Can you point to the right way to implement this in GetDist classes?

Antony Lewis
Posts: 1551
Joined: September 23 2004
Affiliation: University of Sussex
Contact:

### Re: GetDist: pad in triangle plots

You can probably just call it directly after triangle_plot?

Code: Select all

g.fig.subplots_adjust&#40;wspace=0.5, hspace=0.5&#41;
If you want to generalize the getdist code, you can fork it on github and try adding a new optional parameter that's passed to subplots_adjust in triangle_plot (getdist/plots.py).

Jacopo Chevallard
Posts: 3
Joined: January 28 2011
Affiliation: ESA-ESTEC

### GetDist: pad in triangle plots

Indeed! I was just calling

Code: Select all

g.subplots_adjust&#40;wspace=0.5, hspace=0.5&#41;
and it wasn't working...

Great!