diff --git a/bin/plotting/pycbc_plot_singles_vs_params b/bin/plotting/pycbc_plot_singles_vs_params index 33475af08ba..98def36df48 100644 --- a/bin/plotting/pycbc_plot_singles_vs_params +++ b/bin/plotting/pycbc_plot_singles_vs_params @@ -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 @@ -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: @@ -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: