Import sysreload (SYS) sys.setdefaultencoding (' UTF8 ') import matplotlib.pyplot as Pltimport stringfile = open ("GD.txt") I = 0x = range (0) y = Range (0) for line in file: x.append (String.atoi (Line[0:7], ten)) Y.append (String.atoi (line[8:] ) Print X[1]print "111111111111" #print y# Plt.xlabel ("x position") # Plt.ylabel ("y position") # Plt.title ("E Track Dist Ribution diagram \ n Red point was start and Blue point is end. ") #plt. Plot (x, y) plt.plot (k--, Linewidth=1, linestyle= "-.") For I in range (94): Plt.plot (X[i], y[i], ' yo-', linewidth=1) Plt.plot (x[0], y[0], ' r* ', linewidth=10) plt.plot (x [94], y[94], ' b* ', linewidth=10) plot (x, y)
Import Stringimport Matplotlib.pyplot as PLT import numpy as Npfile = open ("Picture.txt") i = 0x = range (0) y = Range (0) For line in file: x.append (String.atoi (Line[0:7], ten)) Y.append (String.atoi (line[8:], ten)) years = Xprice = Yplt.plot (years, Price, ' b* ') #,label= $cos (x^2) $) Plt.plot (years, Price, ' R ') Plt.xlabel (Years (+2000)) Plt.ylabel ("Housing average price (*2000 yuan)") Plt.ylim (0,) plt.title (' Line_regression & gradient Decrease ') plt.legend () Plt.show ()
Hole Puncher
Hole Puncher Show Picture