Skip to content

Commit

Permalink
Fix
Browse files Browse the repository at this point in the history
  • Loading branch information
GarethCabournDavies committed Dec 20, 2024
1 parent 7ed83cb commit 503488e
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions bin/plotting/pycbc_plot_singles_vs_params
Original file line number Diff line number Diff line change
Expand Up @@ -30,6 +30,7 @@ from matplotlib.colors import LogNorm
from matplotlib.ticker import LogLocator
import h5py
import sys
from packaging.version import Version

import pycbc
import pycbc.pnutils
Expand Down Expand Up @@ -148,7 +149,7 @@ hexbin_style = {

# In earlier versions mpl will try to take the max over bins with 0 triggers
# and fail, unless we tell it to leave these blank by setting mincnt
if matplotlib.__version__ < '3.8.1':
if Version(matplotlib.__version__) < Version('3.8.1'):
hexbin_style['mincnt'] = 0

if opts.log_x:
Expand All @@ -175,7 +176,6 @@ elif opts.z_var in ranking.sngls_ranking_function_dict:
max_z = z.max() if opts.max_z is None else opts.max_z
if max_z / min_z > 10:
cb_style['ticks'] = LogLocator(subs=range(10))
print(z)
hb = ax.hexbin(x, y, C=z, reduce_C_function=np.max, **hexbin_style)
fig.colorbar(hb, **cb_style)
else:
Expand Down

0 comments on commit 503488e

Please sign in to comment.