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

Add save option

parent d415f466
No related branches found
No related tags found
No related merge requests found
......@@ -14,6 +14,8 @@ parser.add_argument("expanded_traj", help = "JSon file")
parser.add_argument("e_overestim", help = "text file")
parser.add_argument("SHPC", help = "directory")
parser.add_argument("orientation", choices = ["Anticyclones", "Cyclones"])
parser.add_argument("--save", metavar = "format",
help = "Save file to specified format")
args = parser.parse_args()
with open(args.expanded_traj) as f:
......@@ -51,4 +53,9 @@ for traj in trajectories:
ax.coastlines()
ax.gridlines(draw_labels = True)
plt.show()
if args.save:
plt.savefig(f"plot_traj.{args.save}")
print(f'Created "plot_traj.{args.save}".')
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