Open EmmanuelCharpentier opened 1 year ago
A solution is to stop using from math import sin, cos, pi
and converting positions to floats. We can use instead from sage.functions.trig import sin, cos
and from sage.symbolic.all import pi
. The generation of the graph will be slightly slower but it should solve several issues (plot, curious numerical values, etc.).
This may however require to use the rational field for fractions, etc. See for instance graphs.GolombGraph??
in file src/sage/graphs/generators/basic.py
. This is a significant amount of work but we might gain stability and avoid weird plotting issues.
Is there an existing issue for this?
Did you read the documentation and troubleshoot guide?
Environment
Steps To Reproduce
Graph plotting logic seems to have issues with "marginally inexact" coordinates for vertex positions, best illustrated by an example :
[ The curious numerical values of the position coordinates are questionable, but not the subject of this issue ].
Expected Behavior
displays the subgraph (two vertices and an edge)
Actual Behavior
displays two vertices without an edge :
Additional Information
Original finding : see
ask.sagemath.org
.