Skip to content

Commit

Permalink
AD : small update on plot_corner : Adding a figsize
Browse files Browse the repository at this point in the history
  • Loading branch information
Allan Denis committed Nov 25, 2024
1 parent 10cf8af commit 3f358a4
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion ForMoSA/plotting/plotting_class.py
Original file line number Diff line number Diff line change
Expand Up @@ -336,7 +336,7 @@ def _get_posteriors(self):
self.posteriors_names = tot_list_param_title


def plot_corner(self, levels_sig=[0.997, 0.95, 0.68], bins=100, quantiles=(0.16, 0.5, 0.84), burn_in=0):
def plot_corner(self, levels_sig=[0.997, 0.95, 0.68], bins=100, quantiles=(0.16, 0.5, 0.84), burn_in=0, figsize=(15,15)):
'''
Function to display the corner plot
Expand All @@ -353,6 +353,7 @@ def plot_corner(self, levels_sig=[0.997, 0.95, 0.68], bins=100, quantiles=(0.16,
# make sure posteriors are loaded
self._get_posteriors()

fig = plt.figure(figsize=figsize)
fig = corner.corner(self.posterior_to_plot[burn_in:],
weights=self.weights[burn_in:],
labels=self.posteriors_names,
Expand All @@ -371,6 +372,7 @@ def plot_corner(self, levels_sig=[0.997, 0.95, 0.68], bins=100, quantiles=(0.16,
title_kwargs=dict(fontsize=14),
contour_kwargs=dict(colors=self.color_out, linewidths=0.7),
pcolor_kwargs=dict(color='red'),
fig=fig,
label_kwargs=dict(fontsize=14))


Expand Down

0 comments on commit 3f358a4

Please sign in to comment.