From b3d93bd48df80501298f43ea09dab8602aa691e7 Mon Sep 17 00:00:00 2001 From: James McBride Date: Tue, 11 Aug 2015 10:49:15 -0700 Subject: [PATCH] Moved shapely import to top of file in plotting. --- geopandas/plotting.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/geopandas/plotting.py b/geopandas/plotting.py index 78f9278..e297c22 100644 --- a/geopandas/plotting.py +++ b/geopandas/plotting.py @@ -3,6 +3,7 @@ from __future__ import print_function import numpy as np from six import next from six.moves import xrange +from shapely.geometry import Polygon def plot_polygon(ax, poly, facecolor='red', edgecolor='black', alpha=0.5): @@ -10,7 +11,6 @@ def plot_polygon(ax, poly, facecolor='red', edgecolor='black', alpha=0.5): from descartes.patch import PolygonPatch a = np.asarray(poly.exterior) if poly.has_z: - from shapely.geometry import Polygon poly = Polygon(zip(*poly.exterior.xy)) # without Descartes, we could make a Patch of exterior