Ask Your Question

Revision history [back]

click to hide/show revision 1
initial version

Changing Tick Marks on Geodesic Plot

%display latex
M = Manifold(3, 'M', structure='Lorentzian')
X.<t,p,th> = M.chart(r't:(-oo,+oo) p:(-oo,+oo) th')
X
R2 = Manifold(2, 'R^2', latex_name=r'\mathbb{R}^2')
X2.<x,y> = R2.chart()
to_R2 = M.diff_map(R2, {(X, X2): [sqrt(5*p^2+4*t^2)*cos(th), sqrt(5*p^2+4*t^2)*sin(th)]})
to_R2.display()
g = M.metric()
g[0,0], g[1,1] = -1, 1
g[2,2] = 5*p^2+4*t^2
g.display()
p0 = M.point((-7, 10, 0), name='p_0')
v0 = M.tangent_space(p0)((1, -sqrt(120930)/348, (1)/696), name='v_0')
v0.display()
s = var('s')
geod = M.integrated_geodesic(g, (s, 0, 15), v0); geod
sol = geod.solve() 
interp = geod.interpolate() 
graph = geod.plot_integrated(chart=X2, mapping=to_R2, plot_points=500, 
                         thickness=2, label_axes=True)         
graph += p0.plot(chart=X2, mapping=to_R2, size=4)                                
show(graph)

With this code, the x-y plot has different tick mark intervals for each axis. How can I make each axis the same?