From fe8373a48afc127ae1a923f418c25ed8554fb595 Mon Sep 17 00:00:00 2001 From: Christina Lindberg Date: Fri, 26 May 2023 14:30:13 -0400 Subject: [PATCH] codestyle check 4 --- beast/tools/cut_catalogs.py | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/beast/tools/cut_catalogs.py b/beast/tools/cut_catalogs.py index 83c03f6a..23ed8b5e 100644 --- a/beast/tools/cut_catalogs.py +++ b/beast/tools/cut_catalogs.py @@ -263,12 +263,15 @@ def convexhull_path(x_coord, y_coord, concave_alpha, input_ast_file): path_object = Path(np.array(concave_hull.boundary.xy).T) # create diagnostic plot - ax = plt.subplots(1, 1, figsize=(5, 4)) + fig = plt.figure(figsize=(5, 4)) + ax = fig.subplots(1, 1) ax.scatter(x_coord, y_coord, s=1) ax.plot(path_object.vertices.T[0], path_object.vertices.T[1], c="r") ax.set_xlabel("x") ax.set_ylabel("y") ax.set_title(r"$\alpha$ = " + str(concave_alpha)) + ax.spines['top'].set_visible(False) + ax.spines['right'].set_visible(False) plt.savefig(str(input_ast_file) + "_plot.png", bbox_inches="tight") return path_object