diff --git a/Inst_eddies/Analysis/plot_eddy_contours.py b/Inst_eddies/Analysis/plot_eddy_contours.py index 6bd767b45ab27f80c8f8f9b6a6ae2b65b499903f..338b546f1d88e03499cf43040d7c1e680e3e0f94 100755 --- a/Inst_eddies/Analysis/plot_eddy_contours.py +++ b/Inst_eddies/Analysis/plot_eddy_contours.py @@ -78,14 +78,10 @@ def snapshot(ax, ishape_list, handler, *, dashed = False, light = False, points = shape_rec_extr.shape.points[0] - try: - if shape_rec_extr.record.cyclone == 0: - # Anti-cyclone - color = "red" - else: - color = "blue" - except AttributeError: - color = "green" + if handler["cyclones"]: + color = "blue" + else: + color = "red" lines = ax.plot(points[0], points[1], markersize = 10, color = color, fillstyle = "none", @@ -130,14 +126,10 @@ def snapshot(ax, ishape_list, handler, *, dashed = False, light = False, if shape_m_s != None and shape_m_s.shapeType != shapefile.NULL: points = np.array(shape_m_s.points) - try: - if shape_rec_extr.record.cyclone == 0: - # Anti-cyclone - color = "magenta" - else: - color = "cyan" - except AttributeError: - color = "green" + if handler["cyclones"]: + color = "cyan" + else: + color = "magenta" lines = ax.plot(points[:, 0], points[:, 1], color = color, transform = src_crs)