Page 1 of 1

GetDist Triangle Plot Questions

Posted: June 25 2019
by Josh Kable
I am making a triangle plot using GetDist. This triangle plot has two sets of contours which have a lot of overlap (this is good because I am trying to show agreement between the two). I would like to modify two things in the plot:

1) I would like to make one of the contours semi-transparent so that both contours can be seen. I am not sure how to do this using GetDist. I think I am looking for something similar to the Matplotlib 'alpha' parameter.

2) I would like to make the line widths of the contours thinner. There is a triangle plot parameter 'contour_lws', but this seems to only change the 1-D distribution's line widths not the 2-D contour's line widths. Is there a way to make the 2-D contour's line widths thinner?

Re: GetDist Triangle Plot Questions

Posted: June 27 2019
by Antony Lewis
You can change the settings object, e.g. see box 17 in the plot gallery.

Re: GetDist Triangle Plot Questions

Posted: July 11 2019
by Josh Kable
Thank you for the response. The line_args 'lw' setting seems to only affect the 1-D distributions instead of the contour line widths. Is there something that I am missing? Is there a way to adjust the line widths on the 2-D contours?

Re: GetDist Triangle Plot Questions

Posted: July 12 2019
by Antony Lewis
try changing settings.lw_contour

Re: GetDist Triangle Plot Questions

Posted: October 29 2021
by José Ferreira
I do realize that this is an old thread but since no confirmation by Josh was given, I would like to say that I had a similar issue, I was trying to set a different alpha level for the contours, which can be done as follows:

Code: Select all

g = plots.get_subplot_plotter()
g.settings.alpha_factor_contour_lines=0
I would also like to add, although this is not relevant for this specific thread, why is it that the contours overlap the filled regions of plots which are on top of it, by default? That's the whole reason I'm trying to set a different alpha level for my contour lines.
Here's the output of a corner plot with the default settings, where you can clearly see that the red contour in the 2 sigma region is on top of the filled region in blue which is on top of it, when the red contour should be behind the blue filled region, but still visible due to the alpha level:
Image