Advertisement
umaru666

Linear Regression Beta Graph

Dec 16th, 2019
195
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Python 1.09 KB | None | 0 0
  1. #LinearRegression [In the making]
  2. class summon:
  3.     def __init__(self, x,X,Y):  
  4.         self.x = x
  5.         x = x + 3
  6.         y = x + 2
  7.         cc = [[' 'for i in range(x)]for j in range(y)]
  8.         summon.Graph(x,cc,X,Y)
  9.  
  10.     def Graph(x,cc,X,Y):
  11.         j = x-1
  12.         for i in range(0,x-1):
  13.             #X Axis
  14.             cc[x+1][i+1] = "%d"%(i)
  15.             cc[x][i+1] = "_"
  16.             cc[x][x-1] = "x"
  17.             cc[x+1][x-1] = " "
  18.            
  19.             #Y Axis
  20.             j = j-1
  21.             cc[i+1][0] = "%d"%(j+1)
  22.             cc[i+1][1] = "|"
  23.             cc[x][1] = "L"
  24.             cc[0][1] = "y"
  25.            
  26.         summon.Plot(cc,X,Y,x)
  27.         summon.Display(cc)
  28.        
  29.  
  30.     def Display(cc):
  31.         for items in cc:
  32.             print(items)
  33.            
  34.     def Plot(cc,X,Y,x):
  35.         coal = x
  36.         r = 2
  37.         for i in range(Y):
  38.             coal = coal - r
  39.             coal = coal
  40.        
  41.         cc[coal+Y][X+1] = "o"
  42.            
  43.  
  44. summon(6,1,5)
  45. #Syntax
  46. #Summon(Size,plotX,plotY)
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement