initial commit

This commit is contained in:
2018-08-13 11:22:36 +09:00
commit 0ae676dd96
15 changed files with 12519 additions and 0 deletions

22
graph.py Normal file
View File

@@ -0,0 +1,22 @@
import matplotlib.pyplot as plt
class Graph:
def __init__(self, **kwargs):
self.f = plt.figure()
self.ax = self.f.add_subplot(111)
self.line = None
def draw_variable(self, x, y):
self.x = x
self.y = y
self.ax.scatter(x, y)
plt.ion()
plt.show()
def draw_line(self, x, y):
if self.line is not None:
self.line.remove()
self.line = plt.Line2D(x, y, color='r')
self.ax.add_line(self.line)
plt.draw()
plt.pause(0.000000001)