Ask Your Question

Revision history [back]

click to hide/show revision 1
initial version

Vector Field example fails

The following example fails with an error message in the last line.

This is an example taken from the "manifold.pdf" reference file, Page 337

I'm using SageMath 8.1 on Windows Native.

sage: S2 = Manifold(2, 'S^2')
sage: U = S2.open_subset('U') # the open set covered by spherical coord.
sage: XS.<th,ph> = U.chart(r'th:(0,pi):\theta ph:(0,2*pi):\phi')
sage: R3 = Manifold(3, 'R^3')
sage: X3.<x,y,z> = R3.chart()
sage: F = S2.diff_map(R3, {(XS, X3): [sin(th)*cos(ph),sin(th)*sin(ph), cos(th)]}, name='F')
sage: F.display() # the standard embedding of S^2 into R^3
sage: v = XS.frame()[1] ; v  # the coordinate vector d/dphi
sage: graph_v = v.plot(chart=X3, mapping=F, label_axes=False)
sage: graph_S2 = XS.plot(chart=X3, mapping=F, number_values=9)
sage: graph_v + graph_S2

Moreover, each individual plot does not generate an error, but I don't see any plot, just an empty space!