Ask Your Question

Revision history [back]

Plotting error for parametric plot

I am getting the following error when trying to use parametric_plot:

verbose 0 (3757: plot.py, generate_plot_points) WARNING: When plotting, failed to evaluate function at 200 points. verbose 0 (3757: plot.py, generate_plot_points) Last error message: ''Graphics' object is not callable'

Below is the code. Any ideas how I can avoid this?

t = var('t'); mu_E = 3.98601e5 #Mu in non-canonical km^3 s^-2 R_E = 6378.135; #Earth radius in km C_alt = 600; #Chief's altitude in km R_c = C_alt + R_E; #Orbit radius of chief

x0 = 69.78; y0 = 139.56; zo = 139.56; x0_dot = 0.; y0_dot = -151.116e-3; #in km/s z0_dot = 0.;

n = sqrt(mu_E/R_c^3); T_c = 2piisqrt((R_c^3)/mu_E); #Oribital period of chief

x(t) = (4x0 +2y0_dot/n) + (x0_dot/n)sin(nt) - (3x0 + 2y0_dot/n)cos(nt); y(t) = -(6nx0 + 3y0_dot)t + (y0 - 2x0_dot/n) + (6x0 + 4y0_dot/n)sin(nt) + (2x0_dot/n)cos(nt); px = plot(x,(0., 2T_c)); # py = plot(y,(0., 2T_c)); # pp = parametric_plot((px, py),(0, 2000),color=hue(0.6));