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

move catropy import statemenst to __name__

parent ecc534fa
Branches
Tags
1 merge request!259Draft: Resolve "WRF-Datahandler should inherit from SingleStationDatahandler"
......@@ -20,7 +20,7 @@ from mlair.data_handler import DefaultDataHandler
from typing import Tuple, Union, Dict, List
import logging
import cartopy.crs as ccrs
# ToDo
# test imports for circle plots
......@@ -784,6 +784,10 @@ class DataHandlerMainSectWRF(DefaultDataHandler):
if __name__ == '__main__':
import cartopy.crs as ccrs
from shapely.geometry import Point, Polygon
import math
def plot_map_proj(data, xlim=None, ylim=None, filename=None, point=None, radius=None, **kwargs):
cmap = kwargs.pop('cmap', plt.cm.Reds)
set_background = kwargs.pop('set_background', False)
......@@ -829,8 +833,6 @@ if __name__ == '__main__':
plt.savefig(filename, bbox_inches='tight')
plt.close('all')
def dummy_plot(data, skipna=None, xlim=None, ylim=None):
plt.figure()
crs_latlon = ccrs.PlateCarree()
......@@ -845,11 +847,6 @@ if __name__ == '__main__':
plt.savefig("Example_Multiple_points_test.pdf")
print("plot multiple points")
from shapely.geometry import Point, Polygon
import math
def sector(center, start_angle, end_angle, radius, steps=200):
def polar_point(origin_point, angle, distance):
return [origin_point.x + math.sin(math.radians(angle)) * distance,
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment