Skip to content

Commit

Permalink
Update altiwave.py
Browse files Browse the repository at this point in the history
  • Loading branch information
tristan-salles committed Mar 4, 2021
1 parent f9eb370 commit 1d2132a
Showing 1 changed file with 11 additions and 11 deletions.
22 changes: 11 additions & 11 deletions RADWave/altiwave.py
Expand Up @@ -572,7 +572,7 @@ def plotCycloneTracks(
zorder=5,
)

geodetic_transform = ccrs.Geodetic()._as_mpl_transform(ax)
geodetic_transform = ccrs.PlateCarree()._as_mpl_transform(ax)
text_transform = offset_copy(geodetic_transform, units="dots", y=-30)

cycloneyear = self.cyclone["datetime"].dt.year
Expand Down Expand Up @@ -690,18 +690,18 @@ def visualiseData(
if extent is None:
ax.set_extent(
[self.lonmin, self.lonmax, self.latmin, self.latmax],
crs=ccrs.Geodetic(),
crs=ccrs.PlateCarree(),
)
else:
ax.set_extent(
[extent[0], extent[1], extent[2], extent[3]], crs=ccrs.Geodetic()
[extent[0], extent[1], extent[2], extent[3]], crs=ccrs.PlateCarree()
)

# Add the Stamen data
ax.add_image(stamen_terrain, zoom)

ax.set_title(title)
# ax.coastlines(resolution="10m")
ax.coastlines(resolution="10m")

ax.scatter(
[self.lon],
Expand All @@ -712,12 +712,12 @@ def visualiseData(
edgecolor="black",
linewidth="0.5",
alpha=0.7,
transform=ccrs.Geodetic(),
transform=ccrs.PlateCarree(),
)

# Use the cartopy interface to create a matplotlib transform object
# for the Geodetic coordinate system.
geodetic_transform = ccrs.Geodetic()._as_mpl_transform(ax)
geodetic_transform = ccrs.PlateCarree()._as_mpl_transform(ax)
text_transform = offset_copy(geodetic_transform, units="dots", x=-12)

# Cyclone track
Expand Down Expand Up @@ -749,7 +749,7 @@ def visualiseData(
edgecolor="black",
linewidth="0.5",
alpha=0.7,
transform=ccrs.Geodetic(),
transform=ccrs.PlateCarree(),
)
ax.text(
lon_city,
Expand Down Expand Up @@ -1410,17 +1410,17 @@ def plotCycloneAltiPoint(
if extent is None:
ax.set_extent(
[self.lonmin, self.lonmax, self.latmin, self.latmax],
crs=ccrs.Geodetic(),
crs=ccrs.PlateCarree(),
)
else:
ax.set_extent(
[extent[0], extent[1], extent[2], extent[3]], crs=ccrs.Geodetic()
[extent[0], extent[1], extent[2], extent[3]], crs=ccrs.PlateCarree()
)

ax.add_image(stamen_terrain, zoom)
ax.coastlines(resolution="10m")

geodetic_transform = ccrs.Geodetic()._as_mpl_transform(ax)
geodetic_transform = ccrs.PlateCarree()._as_mpl_transform(ax)
text_transform = offset_copy(geodetic_transform, units="dots", x=-12)

# Cyclone track
Expand Down Expand Up @@ -1500,7 +1500,7 @@ def plotCycloneAltiPoint(
edgecolor="black",
linewidth="0.5",
alpha=0.7,
transform=ccrs.Geodetic(),
transform=ccrs.PlateCarree(),
)

ax.text(
Expand Down

0 comments on commit 1d2132a

Please sign in to comment.