示例#1
0
def random(GV,**kwargs):
	"""
	Assign random positions to all nodes in the graph.  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 random_layout.layout(GV,**kwargs)
示例#2
0
def random(GV, **kwargs):
    """
	Assign random positions to all nodes in the graph.  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 random_layout.layout(GV, **kwargs)
示例#3
0
def random(GV,**kwargs):
	if BBOX_NAME not in kwargs:
		kwargs[BBOX_NAME] = BBOX_DEFAULT_VALUE
		
	return random_layout.layout(GV,**kwargs)