CosmoCoffee Forum Index CosmoCoffee

 
 FAQFAQ   SearchSearch  MemberlistSmartFeed   MemberlistMemberlist    RegisterRegister 
   ProfileProfile   Log inLog in 
Arxiv New Filter | Bookmarks & clubs | Arxiv ref/author:

Producing 3 contours instead of 2 on plots
 
Post new topic   Reply to topic    CosmoCoffee Forum Index -> Computers and software
View previous topic :: View next topic  
Author Message
Sunny Vagnozzi



Joined: 15 Aug 2016
Posts: 41
Affiliation: Oskar Klein Centre, Stockholm University

PostPosted: May 24 2017  Reply with quote

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:
#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:
        self.num_plot_contours = 2

changing the 2 to 3 and on line 533:
Code:
    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
Back to top
View user's profile  
Antony Lewis



Joined: 23 Sep 2004
Posts: 1292
Affiliation: University of Sussex

PostPosted: May 24 2017  Reply with quote

Code:

g.settings.num_plot_contours = 3


(where g is your GetDistPlotter instance). You should never have to hack plots.py.
Back to top
View user's profile [ Hidden ] Visit poster's website
Sunny Vagnozzi



Joined: 15 Aug 2016
Posts: 41
Affiliation: Oskar Klein Centre, Stockholm University

PostPosted: May 24 2017  Reply with quote

Awesome, it worked, thank you so much Anthony!!
Back to top
View user's profile  
Display posts from previous:   
Post new topic   Reply to topic    CosmoCoffee Forum Index -> Computers and software All times are GMT + 5 Hours
Page 1 of 1

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum


Powered by phpBB © 2001, 2005 phpBB Group. Sponsored by WordWeb online dictionary and dictionary software.