Skip to content

Commit

Permalink
matplotlib 3.9 compat
Browse files Browse the repository at this point in the history
  • Loading branch information
cmbant committed Oct 24, 2024
1 parent e8e9d8f commit 475189f
Show file tree
Hide file tree
Showing 5 changed files with 82 additions and 128 deletions.
198 changes: 76 additions & 122 deletions docs/plot_gallery.ipynb

Large diffs are not rendered by default.

2 changes: 1 addition & 1 deletion getdist/__init__.py
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
__author__ = 'Antony Lewis'
__version__ = "1.5.3"
__version__ = "1.5.4"
__url__ = "https://getdist.readthedocs.io"

import os
Expand Down
2 changes: 1 addition & 1 deletion getdist/chains.py
Original file line number Diff line number Diff line change
Expand Up @@ -1249,7 +1249,7 @@ def getParamSampleDict(self, ix, want_derived=True):
:param ix: sample index
:param want_derived: include derived parameters
:return: ordered dictionary of parameter values
:return: dictionary of parameter values
"""
res = dict()
res['weight'] = self.weights[ix]
Expand Down
6 changes: 3 additions & 3 deletions getdist/mcsamples.py
Original file line number Diff line number Diff line change
Expand Up @@ -2406,7 +2406,7 @@ def addDerived(self, paramVec, name, label='', comment='', range=None):

def getParamBestFitDict(self, best_sample=False, want_derived=True, want_fixed=True, max_posterior=True):
"""
Gets an ordered dictionary of parameter values for the best fit point,
Gets a dictionary of parameter values for the best fit point,
assuming calculated results from mimimization runs in .minimum (max posterior) .bestfit (max likelihood)
files exists.
Expand All @@ -2418,7 +2418,7 @@ def getParamBestFitDict(self, best_sample=False, want_derived=True, want_fixed=T
:param want_fixed: also include values of any fixed parameters
:param max_posterior: whether to get maximum posterior (from .minimum file) or maximum likelihood
(from .bestfit file)
:return: ordered dictionary of parameter values
:return: dictionary of parameter values
"""
if best_sample:
if not max_posterior:
Expand All @@ -2437,7 +2437,7 @@ def getParamSampleDict(self, ix, want_derived=True, want_fixed=True):
:param ix: index of the sample to return (zero based)
:param want_derived: include derived parameters
:param want_fixed: also include values of any fixed parameters
:return: ordered dictionary of parameter values
:return: dictionary of parameter values
"""
res = super().getParamSampleDict(ix, want_derived=want_derived)
if want_fixed:
Expand Down
2 changes: 1 addition & 1 deletion getdist/plots.py
Original file line number Diff line number Diff line change
Expand Up @@ -2003,7 +2003,7 @@ def add_legend(self, legend_labels, legend_loc=None, line_offset=0, legend_ncol=
for rect in self.legend.get_patches():
rect.set_edgecolor(rect.get_facecolor())
if colored_text:
for h, text in zip(self.legend.legendHandles, self.legend.get_texts()):
for h, text in zip(self.legend.legend_handles, self.legend.get_texts()):
h.set_visible(False)
if isinstance(h, matplotlib.lines.Line2D):
c = h.get_color()
Expand Down

0 comments on commit 475189f

Please sign in to comment.