ASKSAGE: Sage Q&A Forum - Latest question feedhttps://ask.sagemath.org/questions/Q&A Forum for SageenCopyright Sage, 2010. Some rights reserved under creative commons license.Fri, 09 Jan 2015 06:05:52 -0600- Graph edge label: formatting possibilitieshttps://ask.sagemath.org/question/25448/graph-edge-label-formatting-possibilities/I have a graph with like this and would like to format ( e.g. color ) the edge labels more individual. Is it possible for example to make from 'a|b' the 'a' red and 'b' blue? Also different font types ( bold, italic ) etc would be interesting.
G = Graph(multiedges=True)
G.add_edges( [(0,1,'a|b'),(1,2,'c|d'),(2,3,'e|f'),(3,4,'g|h'),(4,0,'i|j')] )
H = G.plot(edge_labels=True, graph_border=True)
H.show()
When I remember correctly, there is (limited) support for TeX-formatting, could this be used somehow to achieve the formatting?herbFri, 09 Jan 2015 06:05:52 -0600https://ask.sagemath.org/question/25448/
- Draw a 2D spatial networkhttps://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 -0500https://ask.sagemath.org/question/23623/