Producing 3 contours instead of 2 on plots

Use of Cobaya. camb, CLASS, cosmomc, compilers, etc.
Post Reply
Sunny Vagnozzi
Posts: 55
Joined: August 15 2016
Affiliation: Kavli Institute for Cosmology (KICC), University of Cambridge

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 all

#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 all

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

Code: Select all

    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: 1936
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 all

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

Sunny Vagnozzi
Posts: 55
Joined: August 15 2016
Affiliation: Kavli Institute for Cosmology (KICC), University of Cambridge

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