Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

ranges does not apply the user defined ranges in python script #80

Closed
masoumehghn opened this issue Apr 21, 2022 · 2 comments
Closed

ranges does not apply the user defined ranges in python script #80

masoumehghn opened this issue Apr 21, 2022 · 2 comments

Comments

@masoumehghn
Copy link

Hi,

I am beginner and want to use my specified ranges for plotting but MCSamples does not use ranges.
My sample code is:

from getdist import plots, MCSamples
paramsdict_label = np.array([])
labels = ["a0","a1","a2","a3","a4","a5","a6","a7","a8","a9", "b"]
names = ['$a_0$', '$a_1$', '$a_2$','$a_3$','$a_4$','$a_5$','$a_6$','$a_7$','$a_8$','$a_9$','$\epsilon_3^r$']
rangep={'a0':[0.1, 1],'a1':[0.1, 1],'a2':[0.1, 1],'a3':[0.1, 1],'a4':[0.1, 1],'a5':[0.1, 1],'a6':[0.1, 1],'a7':[0.1, 1],'a8':[0.1, 1],'a9':[0.1, 1],'b':[-1,8]}

samples = MCSamples(samples=samples, names=names, ranges=rangep)
g = plots.get_subplot_plotter()
samples.updateSettings({'contours': [0.68, 0.95, 0.99]})
g.settings.num_plot_contours = 3
g.triangle_plot([samples] ,contour_colors=['darkturquoise'], filled=True)
g.export('output_file.pdf')

@cmbant
Copy link
Owner

cmbant commented Apr 21, 2022

Ranges are used to set specified prior bound cuts for parameters, they do not affect plotting limits directly. You can set the param_limits dictionary argument to triangle_plot to override plot limits for specific parameters.

@masoumehghn
Copy link
Author

Thank you for quick response. The problem is solved.

@cmbant cmbant closed this as completed Apr 21, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants