Skip to content

Commit

Permalink
Deal with case where not using any log parameters
Browse files Browse the repository at this point in the history
  • Loading branch information
GarethCabournDavies committed Aug 9, 2024
1 parent f060140 commit dcc2100
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 2 deletions.
1 change: 1 addition & 0 deletions bin/plotting/pycbc_plot_bank_corner
Original file line number Diff line number Diff line change
Expand Up @@ -75,6 +75,7 @@ parser.add_argument("--parameters",
parser.add_argument(
'--log-parameters',
nargs='+',
default=[],
help="Which parameters are to be plotted on a log scale? "
"Must be also given in parameters"
)
Expand Down
6 changes: 4 additions & 2 deletions pycbc/results/scatter_histograms.py
Original file line number Diff line number Diff line change
Expand Up @@ -631,6 +631,8 @@ def create_multidim_plot(parameters, samples, labels=None,
The color map to use for the scatter points. Default is 'plasma'.
scatter_log_cmap : boolean
Should the scatter point coloring be on a log scale? Default False
log_parameters : list or None
Which parameters should be plotted on a log scale
plot_density : {False, bool}
Plot the density of points as a color map.
plot_contours : {True, bool}
Expand All @@ -654,8 +656,6 @@ def create_multidim_plot(parameters, samples, labels=None,
Use the given figure instead of creating one.
axis_dict : dict
Use the given dictionary of axes instead of creating one.
log_parameters : list
Which parameters should be plotted on a log scale
Returns
-------
Expand All @@ -668,6 +668,8 @@ def create_multidim_plot(parameters, samples, labels=None,
"""
if labels is None:
labels = {p: p for p in parameters}
if log_parameters is None:
log_parameters = []
# set up the figure with a grid of axes
# if only plotting 2 parameters, make the marginal plots smaller
nparams = len(parameters)
Expand Down

0 comments on commit dcc2100

Please sign in to comment.