I have the following piece of SAGE script:
...
15 #ALGORYTHM
16 N = 0;
17 PointsList = []
18 Dots = open("dots.dat", "wb")
19 while( K < 1e10 ):
20 T = 2.0/(1+K)
21 A = Matrix([[T-1, 0],[T, 0]])
22 B = Matrix([[0, 2-T],[0, 1-T]])
23 while ( 1 ):
24 U = A*U_p + B*U_pp
25 N+=1
26 if ( abs(U[0]) <= abs(U_p[1]) ):
27 break
28 U_pp = U_p
29 U_p = U
30
31 Dots.write( "%f %f\n" % (K, N) )
32 PointsList.append((K, N))
33 K*=2
34 N=0
35 U_pp = I_pp; U_p = I_p; U = I_U;
36
37 ShowPoints = list_plot( PointsList, color = 'red', size = 20 )
38 show( ShowPoints )
39 Dots.close()
40 print Dots.closed
But after execution sage does not show me any picture and also no graphics displayed. My question is how to make SAGE draw if all commands are in script. NOTE. I do not want to write my code in SAGE's command line. Output is
wolfgang@wolfgang-IdeaPad-Z585:~/PyPrograms/Galperin_Variations$ sage 3_balls.sage
Graphics object consisting of 1 graphics primitive
True
wolfgang@wolfgang-IdeaPad-Z585:~/PyPrograms/Galperin_Variations$
print(). Maybe you have to use some command to display it - likeshow(),display(), etc. - furasShowPoints.save('filename.png'). - John Palmieri