Ask Your Question

Revision history [back]

You can try plotting points and vectors of Euclidean spaces: those have automatic labeling in 2D and 3D plots. For instance:

E.<x,y,z> = EuclideanSpace()
A = E.point((4,3,2), name='A')
v = E.tangent_space(A)((1,2,1), name='v')  # a vector at A
A.plot(size=20, color='red', opacity=0.5) + v.plot(color='green')
  • Remark 1: the command A = E.point((4,3,2), name='A') can be shorten to A = E((4,3,2), name='A') (this notation reflects SageMath's parent/element framework, points being elements of the Euclidean space E)
  • Remark 2: the notation E.tangent_space(A)((1,2,1)) arises from differential geometry; it simply means the vector at A whose components are (1,2,1)

For more details and examples see https://sagemanifolds.obspm.fr/vector_calculus.html