made some work for pastedb / pastecache..
This commit is contained in:
0
btc_tracker/01042023/TheClient/graphing/__init__.py
Normal file
0
btc_tracker/01042023/TheClient/graphing/__init__.py
Normal file
12
btc_tracker/01042023/TheClient/graphing/graph_utils.py
Normal file
12
btc_tracker/01042023/TheClient/graphing/graph_utils.py
Normal file
@ -0,0 +1,12 @@
|
||||
import matplotlib.pyplot as plt
|
||||
|
||||
class Graph():
|
||||
def __init__(self, xdata, ydata):
|
||||
self.fig, self.ax = plt.subplots()
|
||||
self.line, = self.ax.plot(xdata, ydata)
|
||||
|
||||
def update_graph(self, xdata, ydata):
|
||||
self.line.set_data(xdata, ydata)
|
||||
self.ax.relim()
|
||||
self.ax.autoscale_view()
|
||||
self.fig.canvas.draw()
|
Reference in New Issue
Block a user