Skip to content
Snippets Groups Projects
Commit 7d6308f6 authored by Lionel GUEZ's avatar Lionel GUEZ
Browse files

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`.
parent e455550c
No related branches found
No related tags found
No related merge requests found
...@@ -174,13 +174,7 @@ if __name__ == "__main__": ...@@ -174,13 +174,7 @@ if __name__ == "__main__":
parser.add_argument( parser.add_argument(
"-t", "--time", action="store_true", help="Report elapsed time" "-t", "--time", action="store_true", help="Report elapsed time"
) )
parser.add_argument(
# Selection group:
group = parser.add_mutually_exclusive_group()
group.add_argument(
"-n", "--node", help="Select component containing " "node", type=int
)
group.add_argument(
"-w", "-w",
"--window", "--window",
help="choose a limited plot window", help="choose a limited plot window",
...@@ -235,17 +229,6 @@ if __name__ == "__main__": ...@@ -235,17 +229,6 @@ if __name__ == "__main__":
dest_crs = ccrs.PlateCarree((args.window[0] + args.window[2]) / 2) dest_crs = ccrs.PlateCarree((args.window[0] + args.window[2]) / 2)
ax = plt.axes(projection=dest_crs) ax = plt.axes(projection=dest_crs)
plot_all_components(G, label) 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: else:
assign_all_components(G) assign_all_components(G)
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment