From adce78ba5af6d9d2689fb2c0834270bcf031831d Mon Sep 17 00:00:00 2001 From: Max Zwiessele Date: Wed, 26 Feb 2014 13:18:37 +0000 Subject: [PATCH] maps import --- GPy/plotting/matplot_dep/maps.py | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/GPy/plotting/matplot_dep/maps.py b/GPy/plotting/matplot_dep/maps.py index 1c839f64..e941ab2d 100644 --- a/GPy/plotting/matplot_dep/maps.py +++ b/GPy/plotting/matplot_dep/maps.py @@ -4,7 +4,6 @@ import matplotlib.patches as patches from matplotlib.patches import Polygon from matplotlib.collections import PatchCollection #from matplotlib import cm -import shapefile import re pb.ion() @@ -134,8 +133,10 @@ def plot_string_match(sf,regex,field,**kwargs): plot(shape_records,**kwargs) -def new_shape_string(sf,name,regex,field=2,type=shapefile.POINT): - +def new_shape_string(sf,name,regex,field=2,type=None): + import shapefile + if type is None: + type = shapefile.POINT newshp = shapefile.Writer(shapeType = sf.shapeType) newshp.autoBalance = 1