From 7d6308f6040e0ac448a1657afd3802747ebdf763 Mon Sep 17 00:00:00 2001
From: Lionel GUEZ <guez@lmd.ens.fr>
Date: Wed, 21 Feb 2024 23:39:19 +0100
Subject: [PATCH] Remove option to select a component

This is not really useful. If necessary, we can extract a component
with `extract_component_nx.py` or `extract_component.py`.
---
 Overlap/Analysis/plot_components.py | 19 +------------------
 1 file changed, 1 insertion(+), 18 deletions(-)

diff --git a/Overlap/Analysis/plot_components.py b/Overlap/Analysis/plot_components.py
index 4413b856..acb00fd7 100755
--- a/Overlap/Analysis/plot_components.py
+++ b/Overlap/Analysis/plot_components.py
@@ -174,13 +174,7 @@ if __name__ == "__main__":
     parser.add_argument(
         "-t", "--time", action="store_true", help="Report elapsed time"
     )
-
-    # Selection group:
-    group = parser.add_mutually_exclusive_group()
-    group.add_argument(
-        "-n", "--node", help="Select component containing " "node", type=int
-    )
-    group.add_argument(
+    parser.add_argument(
         "-w",
         "--window",
         help="choose a limited plot window",
@@ -235,17 +229,6 @@ if __name__ == "__main__":
         dest_crs = ccrs.PlateCarree((args.window[0] + args.window[2]) / 2)
         ax = plt.axes(projection=dest_crs)
         plot_all_components(G, label)
-    elif args.node is not None:
-        extract_component_nx.add_component(G, args.node)
-
-        if args.time:
-            t1 = time.perf_counter()
-            print("Elapsed time:", t1 - t0, "s")
-            print("Plotting...")
-
-        dest_crs = ccrs.PlateCarree(G.nodes[args.node]["coordinates"][0])
-        ax = plt.axes(projection=dest_crs)
-        plot_nbunch(G, G.nodes[args.node]["component"], label=label)
     else:
         assign_all_components(G)
 
-- 
GitLab