Module Expr Str ImportFrom alias Assign NameStore ListLoad Str Str Assign NameStore Call NameLoad Str Assign NameStore Str Assign NameStore ListLoad NameLoad Assign NameStore Dict NameLoad Num FunctionDef arguments args NameParam defaults body Expr Str Return TupleLoad NameLoad NameLoad decorator_list ClassDef bases body FunctionDef arguments args NameParam NameParam NameParam defaults NameLoad body Expr Str Assign AttributeStore NameLoad attr NameLoad Assign AttributeStore NameLoad attr NameLoad Assign AttributeStore NameLoad attr Dict Assign AttributeStore NameLoad attr NameLoad Assign AttributeStore NameLoad attr Dict Assign AttributeStore NameLoad attr NameLoad Assign AttributeStore NameLoad attr Dict Assign AttributeStore NameLoad attr Dict Assign AttributeStore NameLoad attr NameLoad Assign AttributeStore NameLoad attr TupleLoad Num Assign AttributeStore NameLoad attr Num Assign AttributeStore NameLoad attr Dict Assign AttributeStore NameLoad attr NameLoad Assign AttributeStore NameLoad attr Dict Assign AttributeStore NameLoad attr NameLoad decorator_list FunctionDef arguments args NameParam defaults body Expr Str Return AttributeLoad NameLoad attr decorator_list FunctionDef arguments args NameParam NameParam NameParam defaults body Expr Str If CompareIsNot NameLoad NameLoad body Expr Call AttributeLoad NameLoad attr NameLoad Assign SubscriptStore AttributeLoad NameLoad attr Index NameLoad NameLoad Assign NameStore Call AttributeLoad NameLoad attr SubscriptLoad NameLoad Index Num SubscriptLoad NameLoad Index Num If CompareGt NameLoad AttributeLoad NameLoad attr body Assign AttributeStore NameLoad attr NameLoad orelse Delete SubscriptDel AttributeLoad NameLoad attr Index NameLoad decorator_list FunctionDef arguments args NameParam NameParam NameParam defaults NameLoad body Expr Str If CompareNotIn NameLoad AttributeLoad NameLoad attr body If NameLoad body Return Call AttributeLoad NameLoad attr orelse Return NameLoad orelse Return SubscriptLoad AttributeLoad NameLoad attr Index NameLoad decorator_list FunctionDef arguments args NameParam NameParam defaults body Assign NameStore SubscriptLoad NameLoad Index Num Assign NameStore SubscriptLoad NameLoad Index Num If CompareNotIn NameLoad NameLoad body Raise NameLoad BinOpMod Str NameLoad If CompareNotEq Call NameLoad NameLoad SubscriptLoad NameLoad Index NameLoad body Raise NameLoad BinOpMod Str TupleLoad NameLoad SubscriptLoad NameLoad Index NameLoad Call NameLoad NameLoad Return decorator_list FunctionDef arguments args NameParam NameParam NameParam defaults body If CompareEq NameLoad NameLoad body Return SubscriptLoad NameLoad Index Num orelse Raise NameLoad BinOpMod Str NameLoad decorator_list FunctionDef arguments args NameParam NameParam defaults body Expr Str Expr Call AttributeLoad NameLoad attr NameLoad Assign AttributeStore NameLoad attr SubscriptLoad NameLoad Index Num Assign AttributeStore NameLoad attr SubscriptLoad NameLoad Index Num Assign NameStore Call AttributeLoad NameLoad attr SubscriptLoad NameLoad Index Num SubscriptLoad NameLoad Index Num If CompareGt NameLoad AttributeLoad NameLoad attr body Assign AttributeStore NameLoad attr NameLoad decorator_list FunctionDef arguments args NameParam defaults body Expr Str Return TupleLoad AttributeLoad NameLoad attr AttributeLoad NameLoad attr decorator_list FunctionDef arguments args NameParam defaults body Expr Str Return CompareNotEq AttributeLoad NameLoad attr NameLoad decorator_list FunctionDef arguments args NameParam NameParam defaults body Expr Str Assign AttributeStore NameLoad attr NameLoad decorator_list FunctionDef arguments args NameParam defaults body Expr Str Return AttributeLoad NameLoad attr decorator_list FunctionDef arguments args NameParam defaults body Assign NameStore Num If CompareIsNot AttributeLoad NameLoad attr NameLoad body Assign NameStore AttributeLoad NameLoad attr Return BinOpAdd Call NameLoad SubscriptLoad AttributeLoad NameLoad attr ExtSlice Slice Index Num NameLoad decorator_list FunctionDef arguments args NameParam defaults body Assign NameStore Num If CompareIsNot AttributeLoad NameLoad attr NameLoad body Assign NameStore AttributeLoad NameLoad attr Return BinOpAdd Call NameLoad SubscriptLoad AttributeLoad NameLoad attr ExtSlice Slice Index Num NameLoad decorator_list FunctionDef arguments args NameParam defaults body Assign NameStore Num If CompareIsNot AttributeLoad NameLoad attr NameLoad body Assign NameStore AttributeLoad NameLoad attr Return BinOpSub Call NameLoad SubscriptLoad AttributeLoad NameLoad attr ExtSlice Slice Index Num NameLoad decorator_list FunctionDef arguments args NameParam defaults body Assign NameStore Num If CompareIsNot AttributeLoad NameLoad attr NameLoad body Assign NameStore AttributeLoad NameLoad attr Return BinOpSub Call NameLoad SubscriptLoad AttributeLoad NameLoad attr ExtSlice Slice Index Num NameLoad decorator_list FunctionDef arguments args NameParam NameParam defaults body If CompareIs AttributeLoad NameLoad attr NameLoad body Return NameLoad orelse Return SubscriptLoad AttributeLoad NameLoad attr Index TupleLoad NameLoad Num decorator_list FunctionDef arguments args NameParam NameParam defaults body If CompareIs AttributeLoad NameLoad attr NameLoad body Return NameLoad orelse Return SubscriptLoad AttributeLoad NameLoad attr Index TupleLoad NameLoad Num decorator_list FunctionDef arguments args NameParam NameParam defaults body If CompareIs AttributeLoad NameLoad attr NameLoad body Return TupleLoad NameLoad NameLoad orelse Return TupleLoad SubscriptLoad AttributeLoad NameLoad attr Index TupleLoad NameLoad Num SubscriptLoad AttributeLoad NameLoad attr Index TupleLoad NameLoad Num decorator_list FunctionDef arguments args NameParam NameParam NameParam defaults NameLoad body If CompareNotIn NameLoad AttributeLoad NameLoad attr body If NameLoad body Return AttributeLoad NameLoad attr orelse Return NameLoad orelse Return SubscriptLoad AttributeLoad NameLoad attr Index NameLoad decorator_list FunctionDef arguments args NameParam NameParam NameParam defaults body If CompareIsNot NameLoad NameLoad body Assign SubscriptStore AttributeLoad NameLoad attr Index NameLoad NameLoad orelse Delete SubscriptDel AttributeLoad NameLoad attr Index NameLoad decorator_list FunctionDef arguments args NameParam NameParam NameParam defaults NameLoad body Expr Str If CompareNotIn NameLoad AttributeLoad NameLoad attr body If NameLoad body Return AttributeLoad NameLoad attr orelse Return NameLoad orelse Return SubscriptLoad AttributeLoad NameLoad attr Index NameLoad decorator_list FunctionDef arguments args NameParam NameParam NameParam defaults body Expr Str If CompareIsNot NameLoad NameLoad body Assign SubscriptStore AttributeLoad NameLoad attr Index NameLoad NameLoad orelse If CompareIn NameLoad AttributeLoad NameLoad attr body Delete SubscriptDel AttributeLoad NameLoad attr Index NameLoad decorator_list FunctionDef arguments args NameParam NameParam NameParam defaults NameLoad body Expr Str If CompareNotIn NameLoad AttributeLoad NameLoad attr body If NameLoad body Return AttributeLoad NameLoad attr orelse Return NameLoad orelse Return SubscriptLoad AttributeLoad NameLoad attr Index NameLoad decorator_list FunctionDef arguments args NameParam NameParam NameParam defaults body Expr Str If CompareIsNot NameLoad NameLoad body Assign SubscriptStore AttributeLoad NameLoad attr Index NameLoad NameLoad orelse If CompareIn NameLoad AttributeLoad NameLoad attr body Delete SubscriptDel AttributeLoad NameLoad attr Index NameLoad decorator_list FunctionDef arguments args NameParam NameParam NameParam defaults NameLoad body Expr Str If CompareNotIn NameLoad AttributeLoad NameLoad attr body If NameLoad body Return AttributeLoad NameLoad attr orelse Return NameLoad orelse Return SubscriptLoad AttributeLoad NameLoad attr Index NameLoad decorator_list FunctionDef arguments args NameParam NameParam NameParam defaults body Expr Str If CompareIsNot NameLoad NameLoad body Assign SubscriptStore AttributeLoad NameLoad attr Index NameLoad NameLoad orelse If CompareIn NameLoad AttributeLoad NameLoad attr body Delete SubscriptDel AttributeLoad NameLoad attr Index NameLoad decorator_list FunctionDef arguments args NameParam defaults body Return AttributeLoad NameLoad attr decorator_list FunctionDef arguments args NameParam NameParam defaults body Assign AttributeStore NameLoad attr NameLoad decorator_list FunctionDef arguments args NameParam defaults body Expr Str Return AttributeLoad NameLoad attr decorator_list FunctionDef arguments args NameParam NameParam defaults body Expr Str Assign AttributeStore NameLoad attr NameLoad decorator_list FunctionDef arguments args NameParam defaults body Expr Str Return AttributeLoad NameLoad attr decorator_list FunctionDef arguments args NameParam NameParam defaults body Expr Str Assign AttributeStore NameLoad attr NameLoad decorator_list FunctionDef arguments args NameParam defaults body Expr Str Return AttributeLoad NameLoad attr decorator_list FunctionDef arguments args NameParam NameParam defaults body Expr Str Assign AttributeStore NameLoad attr NameLoad decorator_list decorator_list
N/A N/A 
The ``zen.View`` class encapsulates a graphical description of a graph.  This includes positional information for nodes and edges
as well as colors and shapes of individual elements.

View methods
~~~~~~~~~~~~

.. automethod:: View.__init__(G,pos=None)

.. automethod:: View.graph()

.. automethod:: View.set_shape_(nidx,shape_info)

.. automethod:: View.shape_(nidx,use_default=True)

.. automethod:: View.set_default_shape(shape_info)

.. automethod:: View.get_default_shape()

.. automethod:: View.has_pos_array()

.. automethod:: View.set_pos_array(pos_array)

.. automethod:: View.pos_array()

.. automethod:: View.node_color_(nidx,use_default=True)

.. automethod:: View.set_node_color_(nidx,color)

.. automethod:: View.edge_color_(eidx,use_default=True)

.. automethod:: View.set_edge_color_(eidx,color)

.. automethod:: View.edge_width_(eidx,use_default=True)

.. automethod:: View.set_edge_width_(eidx,width)

.. automethod:: View.default_node_color()

.. automethod:: View.set_default_node_color(color)

.. automethod:: View.default_edge_color()

.. automethod:: View.set_default_edge_color(color)

.. automethod:: View.default_edge_width()

.. automethod:: View.set_default_edge_width(color)

Shapes
~~~~~~

Shapes in the ``View`` are tuples.

.. autofunction:: circle_shape(radius)

Colors
~~~~~~

The valid range of color values/objects is determined by the specific drawing function that will be used.

 exceptions * N/A __all__ N/A View CIRCLE N/A NAN N/A float nan N/A CIRCLE circle N/A SHAPES N/A CIRCLE N/A SHAPE_DIMS N/A CIRCLE 1 circle_shape N/A N/A radius N/A N/A N/A 
	Return a circle shape with the indicated radius.
	 N/A N/A CIRCLE radius N/A View N/A N/A __init__ N/A N/A self G pos_array N/A None N/A N/A 
		Initialize the ``View`` object with the graph, ``G``, that it will contain the graphical description for.
		
		.. note::
			This object is typically called by a call to a :py:mod:`zen.layout` functions.
		
		**Args**:
			
			* ``pos_array [=None]`` (2D ``numpy.ndarray``): the positions for each node in the graph.
		 N/A N/A self G G N/A N/A self _pos pos_array N/A N/A self _ncolors N/A N/A N/A self _default_ncolor None N/A N/A self _nborders N/A N/A N/A self _default_nborder None N/A N/A self _nshape N/A N/A N/A self _nshape_dim N/A N/A N/A self _default_nshape CIRCLE N/A N/A self _default_nshape_dim N/A 0.1 N/A N/A self _max_shape_radius 0.1 N/A N/A self _ecolors N/A N/A N/A self _default_ecolor None N/A N/A self _ewidths N/A N/A N/A self _default_ewidth None N/A graph N/A N/A self N/A N/A N/A 
		Return the graph the view is a graphical representation for.
		 N/A N/A self G N/A set_shape_ N/A N/A self nidx shape_info N/A N/A N/A 
		Set the shape of a specific node in the network.
		
		**Args**:
			* ``nidx`` (int): the node index of the node to set the shape of.
			* ``shape_info`` (:py:class:`tuple`/:py:class:`list`): the attributes of the shape. If ``shape_info`` is ``None``
			  then any shape information currently entered for this node is deleted.
		 N/A N/A shape_info None N/A N/A N/A N/A self __check_shape shape_info N/A N/A N/A self _nshape N/A nidx shape_info N/A max_radius N/A N/A self __shape_radius N/A shape_info N/A 0 N/A shape_info N/A 1 N/A N/A max_radius N/A self _max_shape_radius N/A N/A N/A self _max_shape_radius max_radius N/A N/A N/A N/A self _nshape N/A nidx N/A shape_ N/A N/A self nidx use_default N/A True N/A N/A 
		Return the shape tuple for a specific node in the network.
		
		**Args**:
			* ``nidx`` (int): the node index of the node whose shape information will be retrieved.
			* ``use_default [=True]`` (boolean): if ``True`` and the node has no shape information, 
			  return the default shape information.  If ``False`` and the node has no shape information, 
			  return ``None`` (indicating that there is no shape information set for this node).
		 N/A N/A nidx N/A self _nshape N/A N/A use_default N/A N/A N/A N/A self get_default_shape N/A N/A None N/A N/A N/A N/A self _nshape N/A nidx N/A __check_shape N/A N/A self shape_info N/A N/A N/A shape N/A shape_info N/A 0 N/A dim N/A shape_info N/A 1 N/A N/A shape SHAPE_DIMS N/A N/A ZenException N/A Unknown shape: %s shape N/A N/A N/A len dim N/A SHAPE_DIMS N/A shape N/A N/A ZenException N/A Incorrect number of dimensions for shape %s.  Expected %d, got %d. N/A shape N/A SHAPE_DIMS N/A shape N/A len dim N/A N/A __shape_radius N/A N/A self shape shape_dims N/A N/A N/A N/A shape CIRCLE N/A N/A N/A shape_dims N/A 0 N/A N/A ZenException N/A Unknown shape: %s shape N/A set_default_shape N/A N/A self shape_info N/A N/A N/A 
		Set the default shape for all nodes.
		
		The shape information provided will be applied to all nodes which do not have any shape information
		specified specifically for them.
		
		**Args**:
			* ``shape_info`` (:py:class:`tuple`/:py:class:`list`): the attributes of the shape. If ``shape_info`` is ``None``
			  then any shape information currently entered for this node is deleted.
		 N/A N/A N/A self __check_shape shape_info N/A N/A self _default_nshape N/A shape_info N/A 0 N/A N/A self _default_nshape_dim N/A shape_info N/A 1 N/A max_radius N/A N/A self __shape_radius N/A shape_info N/A 0 N/A shape_info N/A 1 N/A N/A max_radius N/A self _max_shape_radius N/A N/A N/A self _max_shape_radius max_radius N/A get_default_shape N/A N/A self N/A N/A N/A 
		Return the default shape for nodes.
		 N/A N/A N/A self _default_nshape N/A self _default_nshape_dim N/A has_pos_array N/A N/A self N/A N/A N/A 
		Return ``True`` if the position array for the nodes has been set.
		 N/A N/A N/A self _pos None N/A set_pos_array N/A N/A self pos_array N/A N/A N/A 
		Set the position array for nodes in the graph.
		
		**Args**:
			* ``pos_array [=None]`` (2D ``numpy.ndarray``): the positions for each node in the graph.
		 N/A N/A self _pos pos_array N/A pos_array N/A N/A self N/A N/A N/A 
		Return the position array for the nodes in the network.
		 N/A N/A self _pos N/A max_x N/A N/A self N/A N/A N/A shape_buffer 0 N/A N/A N/A self _max_shape_radius None N/A N/A shape_buffer N/A self _max_shape_radius N/A N/A N/A max N/A N/A self _pos N/A N/A N/A 0 shape_buffer N/A max_y N/A N/A self N/A N/A N/A shape_buffer 0 N/A N/A N/A self _max_shape_radius None N/A N/A shape_buffer N/A self _max_shape_radius N/A N/A N/A max N/A N/A self _pos N/A N/A N/A 1 shape_buffer N/A min_x N/A N/A self N/A N/A N/A shape_buffer 0 N/A N/A N/A self _max_shape_radius None N/A N/A shape_buffer N/A self _max_shape_radius N/A N/A N/A min N/A N/A self _pos N/A N/A N/A 0 shape_buffer N/A min_y N/A N/A self N/A N/A N/A shape_buffer 0 N/A N/A N/A self _max_shape_radius None N/A N/A shape_buffer N/A self _max_shape_radius N/A N/A N/A min N/A N/A self _pos N/A N/A N/A 1 shape_buffer N/A pos_x_ N/A N/A self nidx N/A N/A N/A N/A N/A self _pos None N/A N/A NAN N/A N/A N/A N/A self _pos N/A N/A nidx 0 N/A pos_y_ N/A N/A self nidx N/A N/A N/A N/A N/A self _pos None N/A N/A NAN N/A N/A N/A N/A self _pos N/A N/A nidx 1 N/A pos_ N/A N/A self nidx N/A N/A N/A N/A N/A self _pos None N/A N/A N/A NAN NAN N/A N/A N/A N/A N/A self _pos N/A N/A nidx 0 N/A N/A self _pos N/A N/A nidx 1 N/A node_border_ N/A N/A self nidx use_default N/A True N/A N/A N/A nidx N/A self _nborders N/A N/A use_default N/A N/A N/A self _default_nborder N/A N/A None N/A N/A N/A N/A self _nborders N/A nidx N/A set_node_border_ N/A N/A self nidx border_info N/A N/A N/A N/A border_info None N/A N/A N/A N/A self _nborders N/A nidx border_info N/A N/A N/A N/A self _nborders N/A nidx N/A node_color_ N/A N/A self nidx use_default N/A True N/A N/A 
		Return the color of node ``nidx``.
		
		**Args**:
			* ``nidx`` (int): the node index of the node whose color information will be retrieved.
			* ``use_default [=True]`` (boolean): if ``True`` and the node has no color, 
			  return the default color.  If ``False`` and the node has no color, 
			  return ``None`` (indicating that there is no color information set for this node).
		 N/A N/A nidx N/A self _ncolors N/A N/A use_default N/A N/A N/A self _default_ncolor N/A N/A None N/A N/A N/A N/A self _ncolors N/A nidx N/A set_node_color_ N/A N/A self nidx color N/A N/A N/A 
		Set the color of a node.
		
		**Args**:
			* ``nidx`` (int): the node index of the node to set the color for.
			* ``color``: the color to assign the node.
		 N/A N/A color None N/A N/A N/A N/A self _ncolors N/A nidx color N/A N/A N/A nidx N/A self _ncolors N/A N/A N/A N/A self _ncolors N/A nidx N/A edge_color_ N/A N/A self eidx use_default N/A True N/A N/A 
		Return the color of edge ``eidx``.
		
		**Args**:
			* ``eidx`` (int): the edge index of the edge whose color information will be retrieved.
			* ``use_default [=True]`` (boolean): if ``True`` and the edge has no color, 
			  return the default color.  If ``False`` and the edge has no color, 
			  return ``None`` (indicating that there is no color information set for this edge).
		 N/A N/A eidx N/A self _ecolors N/A N/A use_default N/A N/A N/A self _default_ecolor N/A N/A None N/A N/A N/A N/A self _ecolors N/A eidx N/A set_edge_color_ N/A N/A self eidx color N/A N/A N/A 
		Set the color of an edge.
		
		**Args**:
			* ``eidx`` (int): the edge index of the edge to set the color for.
			* ``color``: the color to assign the edge.
		 N/A N/A color None N/A N/A N/A N/A self _ecolors N/A eidx color N/A N/A N/A eidx N/A self _ecolors N/A N/A N/A N/A self _ecolors N/A eidx N/A edge_width_ N/A N/A self eidx use_default N/A True N/A N/A 
		Return the width of edge ``eidx``.
		
		**Args**:
			* ``eidx`` (int): the edge index of the edge whose width will be retrieved.
			* ``use_default [=True]`` (boolean): if ``True`` and the edge has no width, 
			  return the default width.  If ``False`` and the edge has no width, 
			  return ``None`` (indicating that there is no width information set for this edge).
		 N/A N/A eidx N/A self _ewidths N/A N/A use_default N/A N/A N/A self _default_ewidth N/A N/A None N/A N/A N/A N/A self _ewidths N/A eidx N/A set_edge_width_ N/A N/A self eidx width N/A N/A N/A 
		Set the width of an edge.
		
		**Args**:
			* ``eidx`` (int): the edge index of the edge to set the width for.
			* ``color``: the width to assign the edge.
		 N/A N/A width None N/A N/A N/A N/A self _ewidths N/A eidx width N/A N/A N/A eidx N/A self _ewidths N/A N/A N/A N/A self _ewidths N/A eidx N/A default_node_border N/A N/A self N/A N/A N/A N/A self _default_nborder N/A set_default_node_border N/A N/A self border_info N/A N/A N/A N/A self _default_nborder border_info N/A default_node_color N/A N/A self N/A N/A N/A 
		Return the default color that is applied to nodes.
		 N/A N/A self _default_ncolor N/A set_default_node_color N/A N/A self color N/A N/A N/A 
		Set the default color that is applied to nodes.
		 N/A N/A self _default_ncolor color N/A default_edge_color N/A N/A self N/A N/A N/A 
		Return the default color that is applied to edges.
		 N/A N/A self _default_ecolor N/A set_default_edge_color N/A N/A self color N/A N/A N/A 
		Set the default color that is applied to edges.
		 N/A N/A self _default_ecolor color N/A default_edge_width N/A N/A self N/A N/A N/A 
		Return the default width that is applied to edges.
		 N/A N/A self _default_ewidth N/A set_default_edge_width N/A N/A self width N/A N/A N/A 
		Set the default width that is applied to nodes.
		 N/A N/A self _default_ewidth width N/A N/A