Sophie

Sophie

distrib > Mandriva > current > x86_64 > media > contrib-updates > by-pkgid > d49411d98c5501352528beaec338f359 > files > 55

python-pygraphviz-1.0-0.rc5mdv2010.1.x86_64.rpm

<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
  "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">

<html xmlns="http://www.w3.org/1999/xhtml">
  <head>
    <meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
    
    <title>API Notes &mdash; PyGraphviz v1.0.dev1780 documentation</title>
    <link rel="stylesheet" href="../_static/sphinxdoc.css" type="text/css" />
    <link rel="stylesheet" href="../_static/pygments.css" type="text/css" />
    <script type="text/javascript">
      var DOCUMENTATION_OPTIONS = {
        URL_ROOT:    '../',
        VERSION:     '1.0.dev1780',
        COLLAPSE_MODINDEX: false,
        FILE_SUFFIX: '.html',
        HAS_SOURCE:  false
      };
    </script>
    <script type="text/javascript" src="../_static/jquery.js"></script>
    <script type="text/javascript" src="../_static/doctools.js"></script>
    <link rel="search" type="application/opensearchdescription+xml"
          title="Search within PyGraphviz v1.0.dev1780 documentation"
          href="../_static/opensearch.xml"/>
    <link rel="top" title="PyGraphviz v1.0.dev1780 documentation" href="../index.html" />
    <link rel="up" title="Reference" href="index.html" />
    <link rel="next" title="News" href="news.html" />
    <link rel="prev" title="FAQ" href="faq.html" /> 
  </head>
  <body>
<div style="color: black;background-color: white; font-size: 3.2em; text-align: left; padding: 15px 10px 10px 15px">
PyGraphviz
</div>

    <div class="related">
      <h3>Navigation</h3>
      <ul>
        <li class="right" style="margin-right: 10px">
          <a href="../genindex.html" title="General Index"
             accesskey="I">index</a></li>
        <li class="right" >
          <a href="news.html" title="News"
             accesskey="N">next</a> |</li>
        <li class="right" >
          <a href="faq.html" title="FAQ"
             accesskey="P">previous</a> |</li>
        <li><a href="../index.html">PyGraphviz Home </a> |&nbsp;</li>
        <li><a href="../search.html">Search </a> |&nbsp;</li>
        <li><a href="../download.html">Download </a> |&nbsp;</li>
        <li><a href="http://networkx.lanl.gov/trac/wiki/PyGraphviz">Developer Site</a>  |&nbsp;</li>
        <li><a href="../contents.html">Documentation </a> &raquo;</li>

          <li><a href="index.html" accesskey="U">Reference</a> &raquo;</li> 
      </ul>
    </div>

<p>This documentation is for version <b>1.0.dev1780</b>, which is
  not released yet.</p>


      <div class="sphinxsidebar">
        <div class="sphinxsidebarwrapper">
            <h4>Previous topic</h4>
            <p class="topless"><a href="faq.html"
                                  title="previous chapter">FAQ</a></p>
            <h4>Next topic</h4>
            <p class="topless"><a href="news.html"
                                  title="next chapter">News</a></p>
          <div id="searchbox" style="display: none">
            <h3>Quick search</h3>
              <form class="search" action="../search.html" method="get">
                <input type="text" name="q" size="18" />
                <input type="submit" value="Go" />
                <input type="hidden" name="check_keywords" value="yes" />
                <input type="hidden" name="area" value="default" />
              </form>
              <p class="searchtip" style="font-size: 90%">
              Enter search terms or a module, class or function name.
              </p>
          </div>
          <script type="text/javascript">$('#searchbox').show(0);</script>
        </div>
      </div>

    <div class="document">
      <div class="documentwrapper">
        <div class="bodywrapper">
          <div class="body">
            
  <div class="section" id="api-notes">
<h1>API Notes<a class="headerlink" href="#api-notes" title="Permalink to this headline">ΒΆ</a></h1>
<blockquote>
<p>pygraphviz-0.32 is a rewrite of pygraphviz-0.2x  with some significant
changes in the API and Graphviz wrapper.  It is not compatible with
with earlier versions.</p>
<p>The goal of pygraphviz is to provide a (mostly) Pythonic interface
to the Graphviz Agraph data-structure, layout, and drawing algorithms.</p>
<p>The API is now similar to the NetworkX API.  Studying the
documentation and Tutorial for NetworkX will teach you most of what
you need to know for pygraphviz.  For a short introduction on pygraphviz
see the pygraphviz Tutorial.</p>
<p>There are some important differences between the PyGraphviz
and NetworkX API.  With PyGraphviz</p>
<blockquote>
<ul class="simple">
<li>All nodes must be strings. An attempt will be made to convert other
types to a string.</li>
<li>Nodes and edges are custom Python objects.  Nodes are like
string objects and edges are like tuple objects.  (In NetworkX
nodes can be anything and edges are two- or three-tuples.)</li>
<li>Graphs, edges, and nodes may have attributes such as color,
size, shape, attached to them.  If the attributes are known
Graphviz attributes they will be used for drawing and layout.</li>
<li>The layout() and draw() methods allow positioning of nodes
and rendering in all of the supported Graphviz output formats.</li>
<li>The string() method produces a string with the graph represented
in Graphviz dot format.  See also from_string().</li>
<li>The subgraph() method is the Graphviz representation of
subgraphs: a tree of graphs under the original
(root) graph. The are primarily used for clustering of nodes when
drawing with dot.</li>
</ul>
</blockquote>
<p>Pygraphviz supports most of the Graphviz API.</p>
</blockquote>
</div>


          </div>
        </div>
      </div>
      <div class="clearer"></div>
    </div>
    <div class="related">
      <h3>Navigation</h3>
      <ul>
        <li class="right" style="margin-right: 10px">
          <a href="../genindex.html" title="General Index"
             >index</a></li>
        <li class="right" >
          <a href="news.html" title="News"
             >next</a> |</li>
        <li class="right" >
          <a href="faq.html" title="FAQ"
             >previous</a> |</li>
        <li><a href="../index.html">PyGraphviz Home </a> |&nbsp;</li>
        <li><a href="../search.html">Search </a> |&nbsp;</li>
        <li><a href="../download.html">Download </a> |&nbsp;</li>
        <li><a href="http://networkx.lanl.gov/trac/wiki/PyGraphviz">Developer Site</a>  |&nbsp;</li>
        <li><a href="../contents.html">Documentation </a> &raquo;</li>

          <li><a href="index.html" >Reference</a> &raquo;</li> 
      </ul>
    </div>
    <div class="footer">
      &copy; Copyright 2010, Aric Hagberg.
      Last updated on Aug 06, 2010.
      Created using <a href="http://sphinx.pocoo.org/">Sphinx</a> 0.6.5.
    </div>
  </body>
</html>