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.Tue, 06 Jan 2015 20:10:47 +0100Graph: colored edge labelshttps://ask.sagemath.org/question/25413/graph-colored-edge-labels/I'm trying to plot a graph with labels on the edges as follows:
G = Graph(multiedges=True)
G.add_edges( [(0,1,'a'),(1,2,'b'),(2,3,'c'),(3,4,'b'),(4,0,'a')] )
H = G.plot(edge_labels=True, graph_border=True)
H.show()
Is it possible to color the edge labels, e.g. making the "a" red, "b" blue etc?
herbTue, 06 Jan 2015 20:10:47 +0100https://ask.sagemath.org/question/25413/Graph theory: Make vertex labels in plots biggerhttps://ask.sagemath.org/question/9626/graph-theory-make-vertex-labels-in-plots-bigger/Is it possible to make the labels for the vertices of graphs bigger? I can make the vertices themselves bigger but that doesn't seem to change the size of the labels.
Thank you.G-SageWed, 12 Dec 2012 16:51:15 +0100https://ask.sagemath.org/question/9626/Plotting and the show() methodhttps://ask.sagemath.org/question/9622/plotting-and-the-show-method/Hi Wisdom wranglers,
I'm a bit puzzled by the plot2d interface in sage. Using the cli interface, I discovered that I had to use the list_plot().show() method to get the png to show.
Here is a slice of the array passed to list_plot():
[(0.000000000000000, -22.605560302734375),
(0.108611997882434, -22.714309692382812),
(0.219268673499272, -22.81563949584961),
(0.331878474116081, -22.90947914123535)]
Without the show() there was no error, but no plot.
I'm puzzled because the examples in the plot2d documentation do not indicate that show() is necessary.
Question: when is the show() method necessary for list_plot() or other plot functions?
Note: I am using the cli rather than notebook interface. Perhaps this is the reason.
(I simply don't have the bandwidth (or the inclination) to run a notebook server on my tiny computer)PatBSat, 08 Dec 2012 18:54:30 +0100https://ask.sagemath.org/question/9622/Fast show()? (for cached plots for @interact)https://ask.sagemath.org/question/8087/fast-show-for-cached-plots-for-interact/Hello,
I need a fast (no noticeable delay) version of the following:
@interact
def _(a=(0,10)):
time show(plot(lambda x:sin(a*x),plot_points=10000))
Time: CPU 2.65 s, Wall: 2.72 s
<br/>
I can cache the plots, but showing them takes half a second:
@cached_function
def p(a):
return plot(lambda x:sin(a*x),plot_points=10000)
for i in range(101):
p(N(i/10))
@interact
def _(a=(0..100)):
time p2=p(N(a/10))
time show(p2)
Time: CPU 0.00 s, Wall: 0.00 s
Time: CPU 0.42 s, Wall: 0.43 s
<br/>
Is there a faster way?
Thanks!
chaeslocWed, 20 Apr 2011 11:09:16 +0200https://ask.sagemath.org/question/8087/