Skip to content
Snippets Groups Projects
Commit 83d920eb authored by Felix Kleinert's avatar Felix Kleinert
Browse files

add lat/lon ticks to map plot

parent 25f93521
No related branches found
No related tags found
No related merge requests found
Pipeline #37514 failed
......@@ -146,6 +146,7 @@ class PlotStationMap(AbstractPlotClass):
"""
super().__init__(plot_folder, "station_map")
self._ax = None
self._gl = None
self._plot(generators)
self._save()
......@@ -155,6 +156,9 @@ class PlotStationMap(AbstractPlotClass):
"""
import cartopy.feature as cfeature
self._ax.add_feature(cfeature.LAND.with_scale("50m"))
self._ax.natural_earth_shp(resolution='50m')
self._ax.add_feature(cfeature.COASTLINE.with_scale("50m"), edgecolor='black')
self._ax.add_feature(cfeature.LAKES.with_scale("50m"))
self._ax.add_feature(cfeature.OCEAN.with_scale("50m"))
......@@ -187,11 +191,16 @@ class PlotStationMap(AbstractPlotClass):
"""
import cartopy.crs as ccrs
from cartopy.mpl.gridliner import LONGITUDE_FORMATTER, LATITUDE_FORMATTER
fig = plt.figure(figsize=(10, 5))
self._ax = fig.add_subplot(1, 1, 1, projection=ccrs.PlateCarree())
self._ax.set_extent([0, 20, 42, 58], crs=ccrs.PlateCarree())
self._gl = self._ax.gridlines(xlocs=range(0, 21, 5), ylocs=range(42, 59, 2), draw_labels=True)
self._gl.xformatter = LONGITUDE_FORMATTER
self._gl.yformatter = LATITUDE_FORMATTER
self._draw_background()
self._plot_stations(generators)
plt.tight_layout()
@TimeTrackingWrapper
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment