Ask Your Question
2

vertex labels exceed space and intersect with edges

asked 2024-07-01 01:31:31 +0200

Wizzelgarten gravatar image

updated 2024-07-01 14:40:25 +0200

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()
    G.add_vertex(jE)
    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:
            G.add_edge(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 flag offensive close merge delete

1 Answer

Sort by ยป oldest newest most voted
1

answered 2024-07-02 20:52:47 +0200

tmonteil gravatar image

updated 2024-07-02 21:47:38 +0200

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)

edit flag offensive delete link more

Your Answer

Please start posting anonymously - your entry will be published after you log in or create a new account.

Add Answer

Question Tools

1 follower

Stats

Asked: 2024-07-01 01:31:31 +0200

Seen: 91 times

Last updated: Jul 02