title: Cannot see the output on Google colab when I use pygraphviz
body: <p>I have the following code using pygraphviz on Google colab. How do I see the output graph? This is similar to [this question][1], except for the fact that the solution only works for graphviz, and not pygraphviz.</p>
  <pre><code>import pygraphviz as pgz
  
  
  def tocolor(u):
      assert u &gt;= 0
      assert u &lt;= 1
      z = int((1-u)*256)
      return '#%2x%2x%2x'%(z,z,z)
      #return '#%2x%2x%2x'%(int(u*256),100,int((1-u)*256))
  
  def drawG(filename,nodes,c,directed=False):
      n = len(nodes)
      G = pgz.AGraph(strict=True, directed=directed)
      G.node_attr['shape']='circle'
      #G.node_attr['style']='filled'
  
      for x in range(n):
          #G.add_node(nodes[x],fillcolor=&quot;.6 .1 .1&quot;)
          G.add_node(nodes[x])
      for i in range(n):
          for j in range(i+1,n):
              if c[i,j] &lt; 1e-3:
                  continue
              else:
                  u = c[i,j]/100
                  G.add_edge(nodes[i],nodes[j],color=tocolor(u),style=&quot;setlinewidth(4)&quot;)
  
      G.draw(filename,prog='circo',args='-Gsize=&quot;200,200&quot;')
  
  l='Cervix,Vagina,Uterus,Iliac LN,Mandibular LN,Mesenteric LN,Axillary LN,Bronchial LN,Colonic LN,Colon,Spleen,Rectum,Inguinal,Liver,Ovary,Bone Marrow'
  l = l.split(',')
  y = pylab.loadtxt('Matrix.csv',dtype=float,usecols=list(range(1,17)),delimiter=',')
  
  def main():
      drawG('example-graph.pdf',l,y)
  
  main() ```
  
  
    [1]: https://stackoverflow.com/questions/59560168/graphviz-not-printing-output-graph-on-colab
  </code></pre>