Changeset 9194


Ignore:
Timestamp:
Jun 18, 2014, 10:08:42 PM (10 years ago)
Author:
steve
Message:

nxutils is depreciated in matplotlib

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/anuga_core/source/anuga/utilities/plot_utils.py

    r9193 r9194  
    854854        from anuga.utilities import plot_utils as util
    855855        import os
    856         from matplotlib import nxutils
     856        #from matplotlib import nxutils
    857857    except:
    858858        raise Exception, 'Required modules not installed for Make_Geotif'
     
    939939    swwXY=scipy.array([swwX[:],swwY[:]]).transpose()
    940940    # Get index of nearest point
    941     #index_qFun=scipy.interpolate.NearestNDInterpolator(swwXY,scipy.arange(len(swwX),dtype='int64').transpose())
    942     index_qFun=scipy.interpolate.LinearNDInterpolator(swwXY,scipy.arange(len(swwX),dtype='int64').transpose())
     941    index_qFun=scipy.interpolate.NearestNDInterpolator(swwXY,scipy.arange(len(swwX),dtype='int64').transpose())
     942    #index_qFun=scipy.interpolate.LinearNDInterpolator(swwXY,scipy.arange(len(swwX),dtype='int64').transpose())
    943943
    944944    gridXY_array=scipy.array([scipy.concatenate(gridX),scipy.concatenate(gridY)]).transpose()
     
    947947    if(bounding_polygon is not None):
    948948        # Find points to exclude (i.e. outside the bounding polygon)
    949         cut_points=(nxutils.points_inside_poly(gridXY_array, bounding_polygon)==False).nonzero()[0]
     949        from anuga.geometry.polygon import outside_polygon
     950        cut_points = outside_polygon(gridXY_array, bounding_polygon)
     951        #cut_points=(nxutils.points_inside_poly(gridXY_array, bounding_polygon)==False).nonzero()[0]
    950952       
    951953    # Loop over all output quantities and produce the output
Note: See TracChangeset for help on using the changeset viewer.