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

Improve visual aspect of the plot

parent f5820c21
No related branches found
No related tags found
No related merge requests found
......@@ -20,8 +20,9 @@ def get_extr_coord(traj, e_overestim, SHPC):
def plot_single_traj(traj, e_overestim, SHPC, ax, src_crs, annotate_flag):
x, y = get_extr_coord(traj, e_overestim, SHPC)
ax.plot(x, y, color = "red", transform = src_crs)
ax.plot(x[0], y[0], marker = "s", color = "black", transform = src_crs)
ax.plot(x, y, color = "red", linewidth = 0.5, transform = src_crs)
ax.plot(x[0], y[0], marker = "s", markersize = 2, color = "black",
transform = src_crs)
if annotate_flag:
ax.annotate(str(traj[0]),
......@@ -35,6 +36,7 @@ if __name__ == "__main__":
import json
import cartopy.crs as ccrs
import argparse
import cartopy.feature as cfeature
parser = argparse.ArgumentParser()
parser.add_argument("expanded_traj", help = "JSon file")
......@@ -60,7 +62,7 @@ if __name__ == "__main__":
SHPC = util_eddies.SHPC_class(args.SHPC, def_orient = args.orientation)
src_crs = ccrs.PlateCarree()
projection = ccrs.PlateCarree(central_longitude = 90)
projection = ccrs.PlateCarree(central_longitude = 110)
fig, ax = plt.subplots(subplot_kw = {"projection": projection})
random.seed(0)
n_long_traj = 0
......@@ -76,7 +78,7 @@ if __name__ == "__main__":
plot_single_traj(traj, e_overestim, SHPC, ax, src_crs,
args.annotate)
ax.coastlines()
ax.add_feature(cfeature.LAND, edgecolor = "black")
ax.gridlines(draw_labels = True)
if args.min_duration > 1:
......
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