Files
tcd1304-viewer/tcd1304_viewer/viewer.py
2023-10-29 20:55:05 -03:00

19 lines
355 B
Python

import numpy as np
import matplotlib.pyplot as plt
class Viewer:
def update_data(self, data: np.array) -> None:
plt.clf()
plt.xlabel("Pixel")
plt.ylabel("Tension (V)")
plt.legend()
x = np.arange(1, len(data) + 1)
plt.plot(x, data, label="Intensity")
def show(self) -> None:
plt.show()