コード例 #1
0
ファイル: __init__.py プロジェクト: Atomised/zenlib
def forceatlas(GV,**kwargs):
	"""
	Use a `force-based <http://en.wikipedia.org/wiki/Force-based_algorithms_(graph_drawing)>`_ algorithm for
	deriving positions for the nodes.  Edges follow a straight path between their endpoints.
	
	**Args**:
		
		* ``GV``: the graph or view (containing a graph) whose layout will be built.
		
	**KwArgs**:
	
		* ``bbox [=(0,0,100,100)]`` (:py:class:`tuple`): the spatial box into which all nodes should be confined.
	
	**Returns**:
		:py:class:`zen.View`. A view object with the position array set to the positions determined by this layout.
	"""
	if BBOX_NAME not in kwargs:
		kwargs[BBOX_NAME] = BBOX_DEFAULT_VALUE

	return forceatlas_layout.layout(GV,**kwargs)
コード例 #2
0
ファイル: __init__.py プロジェクト: vibster/zenlib
def forceatlas(GV, **kwargs):
    """
	Use a `force-based <http://en.wikipedia.org/wiki/Force-based_algorithms_(graph_drawing)>`_ algorithm for
	deriving positions for the nodes.  Edges follow a straight path between their endpoints.
	
	**Args**:
		
		* ``GV``: the graph or view (containing a graph) whose layout will be built.
		
	**KwArgs**:
	
		* ``bbox [=(0,0,100,100)]`` (:py:class:`tuple`): the spatial box into which all nodes should be confined.
	
	**Returns**:
		:py:class:`zen.View`. A view object with the position array set to the positions determined by this layout.
	"""
    if BBOX_NAME not in kwargs:
        kwargs[BBOX_NAME] = BBOX_DEFAULT_VALUE

    return forceatlas_layout.layout(GV, **kwargs)
コード例 #3
0
ファイル: __init__.py プロジェクト: dellsystem/zenlib
def forceatlas(GV,**kwargs):
	if BBOX_NAME not in kwargs:
		kwargs[BBOX_NAME] = BBOX_DEFAULT_VALUE

	return forceatlas_layout.layout(GV,**kwargs)