# vertex labels exceed space and intersect with edges

The following code generates a supersingular isogeny graph. However the problem is, that the white circle that represents the vertices of the graph (generated by the parameter 'talk') is not big enough to contain the entire label of the vertex. The labels exceeds the space left for it and I did not find any way to fix this Can anyone tell me how to produce a graph that looks something like this(page 10, fig 4), where the vertex size is adapted to the length of the vertex label?

If I set 'talk=False' then the vertex is representend by a small dot, but then again the label is sometimes only partially readable, is intersecting with the edges and sometimes even with other vertex labels.

However, it would also be helpful if I could give the vertex labels some off-set, for example 2cm to the right of the vertex or something like this.

I considered all Plot opstions on the doc page and did not find any solution for my problem. However, maybe there is some kind of work around. Unfortunately I do not have enough experience with sage myself so any help on this would be very helpful.

def explore(G, E, done,degree):
jE = E.j_invariant()
done.append(jE)
for i in E.isogenies_prime_degree(degree):
F = i.codomain()
jF = F.j_invariant()
if jF not in done:
explore(G, F,done,degree)
if jE != jF:
return G

k.<i> = GF(431^2, modulus=x^2+1)
degree = 2
E = EllipticCurve(k,[1,0])
done=[]
G=explore(Graph(), E, done,degree)
Gr=G.plot(layout='spring', vertex_labels =True, vertex_color= 'black', talk=True, figsize=15)


I would highly appreciate any help on this!

edit retag close merge delete

Sort by ยป oldest newest most voted

My understanding is that the talk option overrides the color and the size of the vertices (to generate images that can be added in slides), see the documentation of the talkoption in https://doc.sagemath.org/html/en/refe...

You should set vertex_color and vertex_size yourself, and disable the talk option.

On my Sage install, the following provides something acceptable:

sage: Gr=G.plot(layout='spring', vertex_labels=True, vertex_color='white', vertex_size=4500, figsize=20)


(as you can see, your vertex_color='black' option was preempted by the talk=True option)

more