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

Add save option

parent 66a1fe82
No related branches found
No related tags found
No related merge requests found
......@@ -136,7 +136,15 @@ if __name__ == "__main__":
parser.add_argument(
"dir", help="directory containing collection of shapefiles"
)
parser.add_argument("--save", action="store_true")
args = parser.parse_args()
d = read(args.dir)
fig_list = plot_all([d])
plt.show()
if args.save:
for i, fig in enumerate(fig_list):
fig.savefig(f"figure_{i}.png")
print(f"Created figure_[0-{len(fig_list)-1}].png")
else:
plt.show()
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