Skip to content

Commit

Permalink
fix meanlikes plotting and docstrings
Browse files Browse the repository at this point in the history
  • Loading branch information
cmbant committed Jul 30, 2023
1 parent e5d4176 commit 5fa3dca
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 5 deletions.
2 changes: 1 addition & 1 deletion docs/plot_gallery.ipynb
Original file line number Diff line number Diff line change
Expand Up @@ -1919,7 +1919,7 @@
"name": "python",
"nbconvert_exporter": "python",
"pygments_lexer": "ipython3",
"version": "3.11.0"
"version": "3.11.4"
}
},
"nbformat": 4,
Expand Down
8 changes: 4 additions & 4 deletions getdist/plots.py
Original file line number Diff line number Diff line change
Expand Up @@ -982,7 +982,7 @@ def add_1d(self, root, param, plotno=0, normalized=None, ax=None, title_limit=No
if kwargs.get('dashes'):
l.set_dashes(kwargs['dashes'])
if self.settings.plot_meanlikes:
kwargs['lw'] = self._scaled_linewidth(self.settings.linewidth_likes)
kwargs['lw'] = self._scaled_linewidth(self.settings.linewidth_meanlikes)
ax.plot(density.x, density.likes, **kwargs)
if title_limit:
if isinstance(root, MixtureND):
Expand Down Expand Up @@ -1198,7 +1198,7 @@ def add_2d_mixture_projection(self, mixture, param1, param2, **kwargs):
density = mixture.marginalizedMixture(params=[param1, param2]).density2D()
return self.add_2d_density_contours(density, **kwargs)

def add_x_marker(self, marker: float, color=None, ls=None, lw=None, ax=None, **kwargs):
def add_x_marker(self, marker: Union[float, Sequence[float]], color=None, ls=None, lw=None, ax=None, **kwargs):
"""
Adds vertical lines marking x values. Optional arguments can override default settings.
Expand All @@ -1220,7 +1220,7 @@ def add_x_marker(self, marker: float, color=None, ls=None, lw=None, ax=None, **k
for m in marker:
self.get_axes(ax).axvline(m, ls=ls, color=color, lw=lw, **kwargs)

def add_y_marker(self, marker: float, color=None, ls=None, lw=None, ax=None, **kwargs):
def add_y_marker(self, marker: Union[float, Iterable[float]], color=None, ls=None, lw=None, ax=None, **kwargs):
"""
Adds horizontal lines marking y values. Optional arguments can override default settings.
Expand Down Expand Up @@ -1556,7 +1556,7 @@ def plot_1d(self, roots, param, marker=None, marker_color=None, label_right=Fals
:param roots: root name or :class:`~.mcsamples.MCSamples` instance (or list of any of either of these) for
the samples to plot
:param param: the parameter name to plot
:param marker: If set, places a marker at given coordinate.
:param marker: If set, places a marker at given coordinate (or list of coordinates).
:param marker_color: If set, sets the marker color.
:param label_right: If True, label the y-axis on the right rather than the left
:param title_limit: If not None, a maginalized limit (1,2..) of the first root to print as the title of the plot
Expand Down

0 comments on commit 5fa3dca

Please sign in to comment.