From f4b97d7daf3e8da70e87487346aea96d4ffc409e Mon Sep 17 00:00:00 2001 From: michaelchin Date: Mon, 23 Dec 2024 22:27:46 +1100 Subject: [PATCH] fill plate polygons with random colors in test_plot.py --- tests-dir/unittest/test_plot.py | 13 +++++++------ 1 file changed, 7 insertions(+), 6 deletions(-) diff --git a/tests-dir/unittest/test_plot.py b/tests-dir/unittest/test_plot.py index 4132b5aa..2880f4db 100755 --- a/tests-dir/unittest/test_plot.py +++ b/tests-dir/unittest/test_plot.py @@ -16,8 +16,8 @@ # test the plot function with the new PlateModel class # MODEL_NAME = "Clennett2020" -# MODEL_NAME = "Muller2019" -MODEL_NAME = "merdith2021" +MODEL_NAME = "Muller2019" +# MODEL_NAME = "merdith2021" def main(show=True): @@ -56,7 +56,7 @@ def main(show=True): "ridges": 0, "all_topologies": 0, "all_topological_sections": 0, - "plate_polygon_by_id": 0, + "plate_polygon_by_id": 1, "unclassified_features": 0, "slab_edges": 0, "passive_continental_boundaries": 0, @@ -71,7 +71,7 @@ def main(show=True): "faults": 0, "continental_rifts": 0, "misc_boundaries": 0, - "transforms": 1, + "transforms": 0, "continents": 0, "topological_plate_boundaries": 0, } @@ -97,11 +97,12 @@ def main(show=True): ids = set([f.get_reconstruction_plate_id() for f in gplot.topologies]) for id in ids: if all_flag or plot_flag["plate_polygon_by_id"]: + color = list(np.random.choice(range(256), size=3) / 256) gplot.plot_plate_polygon_by_id( ax, id, - facecolor="None", - edgecolor=list(np.random.choice(range(256), size=3) / 256), + facecolor=color + [0.5], + edgecolor=color, ) plt.title(f"{age} Ma")