ASKSAGE: Sage Q&A Forum - Latest question feedhttp://ask.sagemath.org/questions/Q&A Forum for SageenCopyright Sage, 2010. Some rights reserved under creative commons license.Wed, 13 May 2015 20:21:14 -0500- How to create curved, directed, and labelled edges of a graphhttp://ask.sagemath.org/question/26823/how-to-create-curved-directed-and-labelled-edges-of-a-graph/ I am using the graph_editor() to create a graph in the SageMath notebook. This is good but it does not allow me to create a curved edge, directed edge or a labelled edge. Does anyone know how to do this in SageMath? Thank you for your help.cheboluWed, 13 May 2015 20:21:14 -0500http://ask.sagemath.org/question/26823/
- Draw a 2D spatial networkhttp://ask.sagemath.org/question/23623/draw-a-2d-spatial-network/ Hi experts!
I have:
* a list of Q 'NODES'=[(x,y)_1,........, (x,y)_Q], where each element (x,y) represent the spatial position of the node in 2D Cartesian space.
* a matrix 'H' with QxQ elements {H_k,l}.
H_k,l=0 if nodes 'k' and 'l' aren't joined by a edge, and H_k,l = the length of the edge that connects these nodes.
* a matrix 'Z' with QxQ elements {Z_k,l}.
Z_k,l=0 if nodes 'k' and 'l' aren't joined by a edge, and Z_k,l = intensity_k,l (a intensity scale of the edge)
I want to draw the nodes in their spatial position, connected by the edges, and use a color scale for the 'intensity'.
How must I do that?
Waiting for your answers.
Thanks a lot!
Best regards,
JosÃ© LuismresimulatorTue, 29 Jul 2014 07:21:54 -0500http://ask.sagemath.org/question/23623/
- plt.show() and plt.draw() doesnt workhttp://ask.sagemath.org/question/23387/pltshow-and-pltdraw-doesnt-work/Hi experts!
I have a numpy array M. I generate a graph using NetworkX and then I want to draw this graph:
import networkx as nx
import matplotlib.pyplot as plt
G=nx.Graph(M)
nx.draw(G)
plt.draw()
Doing this, no picture appears. In addition, if I do `plt.show()` no picture appears neither.
If I do
import numpy as np
import matplotlib.pyplot as plt
x = np.range(0, 5, 0.1);
y = np.sin(x)
plt.plot(x, y)
no picture appears neither.
What happend?
Please help!
Best regardsmresimulatorSat, 12 Jul 2014 11:52:36 -0500http://ask.sagemath.org/question/23387/
- Drawing a graph - fixing its layouthttp://ask.sagemath.org/question/10675/drawing-a-graph-fixing-its-layout/Hello!
I would like to draw a simple graph $G$ and its complement $\overline{G}.$ I was asked to make the drawing such that it is evident that the drawings are complementary. More precisely I was advised to draw $G$ and $\overline{G}$ such that the coordinates of the vertices of $G$ are the same as the one for $\overline{G}.$
What would be an easy way to accomplish this in Sage?
Thank youJernejWed, 30 Oct 2013 06:29:11 -0500http://ask.sagemath.org/question/10675/