#NEWLINE# @ staticmethod #NEWLINE# def clean( x , y , conn , values = None , labels = None , color = None , group = None , colormap = None , size = None ) : #NEWLINE# #INDENT# '\n        Create a node-link graph from spatial points and their connectivity.\n\n        .. image:: graph.png\n\n        Parameters\n        ----------\n        x,y : array-like, each (n,)\n            Input data for nodes (x,y coordinates)\n\n        conn : array-like, (n,n) or (n,3) or (n,2)\n            Input connectivity data as either a matrix or a list of links.\n            Matrix can be binary or continuous valued. Links should contain\n            either 2 elements per link (source, target),\n            or 3 elements (source, target, value).\n\n        values : array-like, optional, singleton or (n,)\n            Values to set node colors via a linear scale\n\n        labels : array-like, optional, (n,)\n            Array of text labels to set tooltips\n\n        color : array-like, optional, singleton or (n,) or (n,3)\n            Single rgb value or array to set node colors\n\n        group : array-like, optional, singleton or (n,)\n            Single integer or array to set node colors via group assignment\n\n        colormap : string\n            Specification of color map, only colorbrewer types supported\n\n        size : array-like, optional, singleton or (n,)\n            Single size or array to set node sizes\n\n        tooltips : boolean, optional, default=True\n            Whether to show tooltips\n\n        zoom : boolean, optional, default=True\n            Whether to allow zooming\n\n        brush : boolean, optional, default=True\n            Whether to support brushing\n        ' #NEWLINE# links = parse_links ( conn ) #NEWLINE# nodes = vecs_to_points ( x , y ) #NEWLINE# outdict = { #NEWLINE# #INDENT# 'links' : links , #NEWLINE# 'nodes' : nodes , #NEWLINE# #UNINDENT# } #NEWLINE# outdict = add_property ( outdict , color , 'color' ) #NEWLINE# outdict = add_property ( outdict , group , 'group' ) #NEWLINE# outdict = add_property ( outdict , values , 'values' ) #NEWLINE# outdict = add_property ( outdict , labels , 'labels' ) #NEWLINE# outdict = add_property ( outdict , colormap , 'colormap' ) #NEWLINE# outdict = add_property ( outdict , size , 'size' ) #NEWLINE# return outdict