Producing 3 contours instead of 2 on plots

Use of Healpix, camb, CLASS, cosmomc, compilers, etc.
Post Reply
Sunny Vagnozzi
Posts: 43
Joined: August 15 2016
Affiliation: Oskar Klein Centre, Stockholm University

Producing 3 contours instead of 2 on plots

Post by Sunny Vagnozzi » May 24 2017

Dear Anthony et al,

a (probably) easy question here! Usually the 2D and triangular plots, plotted through the scripts produced by getdist, have 2 contours, representing the joint 68% and 95% C.L. regions.

Now say I want to plot a third contour (e.g. 99%), where do I have to go and modify the code in order to do that? In python/getdist/analysis_defaults.ini I already have:

Code: Select allp>

#Confidence limits for marginalized constraints.
#Also used for 2D plots, but only number set by plot settings actually shown
contours = 0.68 0.95 0.99
so that can't be what I have to modify. I tried modifying python/getdist/plots.py, in particular on line 147:

Code: Select allp>

        self.num_plot_contours = 2
changing the 2 to 3 and on line 533:

Code: Select allp>

    def get_density_grid(self, root, param1, param2, conts=2, likes=False):
changing the 2 to 3, but neither worked.

Any ideas? Thank you very much in advance!

Cheers,
Sunny

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

Re: Producing 3 contours instead of 2 on plots

Post by Antony Lewis » May 24 2017

Code: Select allp>

g.settings.num_plot_contours = 3
(where g is your GetDistPlotter instance). You should never have to hack plots.py.

Sunny Vagnozzi
Posts: 43
Joined: August 15 2016
Affiliation: Oskar Klein Centre, Stockholm University

Producing 3 contours instead of 2 on plots

Post by Sunny Vagnozzi » May 24 2017

Awesome, it worked, thank you so much Anthony!!

Post Reply