ASKSAGE: Sage Q&A Forum - RSS feedhttps://ask.sagemath.org/questions/Q&A Forum for SageenCopyright Sage, 2010. Some rights reserved under creative commons license.Thu, 31 Jan 2019 18:17:25 +0100Sage and pygraphviz helphttps://ask.sagemath.org/question/45248/sage-and-pygraphviz-help/ Hi all!
I am trying to run pygraphviz on Sage8.6 (on Windows 10), but having some troubles.
When I run the Sage Shell as administrator, I can pip install graphviz without any problems. When I try to pip install pygraphviz, however, it comes with the following error message:
> Command
> "/opt/sagemath-8.6/local/bin/python2
> -u -c "import setuptools, tokenize;__file__='/tmp/pip-install-ApORib/pygraphviz/setup.py';f=getattr(tokenize,
> 'open',
> open)(__file__);code=f.read().replace('\r\n', '\n');f.close();exec(compile(code,
> __file__, 'exec'))" install --record /tmp/pip-record-dJAQAU/install-record.txt
> --single-version-externally-managed --compile" failed with error code 1 in /tmp/pip-install-ApORib/pygraphviz/
I have a screenshot of the full error code if that is helpful (but I am not sure how to post it as I do not have enough karma), and there was someone else who posted a similar question, but their solution did not seem to work for me (I would link to it but, again, not enough karma).
Please help!ZainAK283Thu, 31 Jan 2019 18:17:25 +0100https://ask.sagemath.org/question/45248/Is there other ways to visualize weights of the graph edges aside from labels?https://ask.sagemath.org/question/25965/is-there-other-ways-to-visualize-weights-of-the-graph-edges-aside-from-labels/Assuming I have graph:
M = Matrix([[0,1,-1],[1,0,-1/2],[-1,-1/2,0]])
G = Graph(M)
In order to plot it and visualize edge weights I can do:
G.plot(edge_labels=True)
This will put labels on the edges, but is there other ways? For example, varying edge thickness in regard to the weight it represents, so the higher weight will be represented by thick lines and lower by thin lines? Or, more generally, is there other ways of visualization of the weights?EugeneSat, 28 Feb 2015 10:56:36 +0100https://ask.sagemath.org/question/25965/Put in "SAGE path" with virtualboxhttps://ask.sagemath.org/question/10510/put-in-sage-path-with-virtualbox/I hope that this question is not too simple and has not been asked before. I'm trying to make graphviz work in SAGE and the installation instructions say to put it "in my path." I'm using a VirtualBox setup on Windows and I have no idea what it means to put graphviz in my path in this context. In general, any help with installing graphviz would be much appreciated. Thanks!Chuck HagueThu, 05 Sep 2013 16:51:56 +0200https://ask.sagemath.org/question/10510/can't use networkx.read_dot()https://ask.sagemath.org/question/8641/cant-use-networkxread_dot/
When trying the following
import networkx
networkx.read_dot("foo.dot")
I get
ImportError Traceback (most recent call last)
/home/bla/tmp/<ipython console> in <module>()
/local/usr/share/sage/local/lib/python/networkx/drawing/nx_agraph.pyc in read_dot(path)
197 except ImportError:
198 raise ImportError, \
--> 199 "read_dot() requires pygraphviz: http://networkx.lanl.gov/pygraphviz"
200 A=pygraphviz.AGraph(file=path)
201 return from_agraph(A)
ImportError: read_dot() requires pygraphviz: http://networkx.lanl.gov/pygraphviz
It seems that I'm missing something really simple here. After a fair time browsing the documentation, however, I couldn't find what :(
Thanks in advance.rcThu, 19 Jan 2012 18:36:09 +0100https://ask.sagemath.org/question/8641/