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.Thu, 03 Mar 2016 09:06:39 -0600Changing vertex labels on a randomly generated graphhttps://ask.sagemath.org/question/32702/changing-vertex-labels-on-a-randomly-generated-graph/ I know that if I want to create a graph on 4 vertices with vertex labels 1,2,3,4 then I can define my graph like this:
G = Graph({0: [1, 3], 1: [2, 3,4], 2: [1,4], 3: [], 4: []})
and then when I print in LaTeX using sagetex the labels show up as 1,2,3,4 but when I try to create a graph randomly
graphs.RandomGNM(4,5)).show(figsize=[4,4], graph_border=True)
the vertex labels are 0,1,2,3. How do I change the default vertex labels of a randomly created graph?dazedANDconfusedThu, 03 Mar 2016 09:06:39 -0600https://ask.sagemath.org/question/32702/