Python tab finished

This commit is contained in:
theo.canaud 2022-06-16 15:39:25 +02:00
parent c39dcdee1f
commit db8baf2d97
2 changed files with 8 additions and 18 deletions

View file

@ -71,7 +71,8 @@ f = np.fft.fftfreq(Fe,tstep) #axe des abscisses: fréquence
#Définition des courbes des plots
ax1.plot(t,y) # print y(t)
ax2.plot(f,abs(sp))
ax2.plot(f,abs(sp))#ax1 = plt.axes()
#Lancement de l'affichage du plot
plt.show()

View file

@ -1,3 +1,4 @@
from asyncore import read
import math
import numpy as np
import matplotlib.pyplot as plt
@ -8,25 +9,13 @@ import csv
#! /usr/bin/env python3
# -*- coding: UTF-8 -*-
csv_reader1 = csv.reader(open('../RawDataFiles/RawData1.csv')) #Ouvre le fichier .csv
capteurs = []
with open('../RawDataFiles/RawData1.csv', 'r') as f:
data = csv.reader(f, quoting = csv.QUOTE_MINIMAL)
for lign in data:
print(lign)
print("\n")
for ligne in csv_reader1:
capteurs.append(ligne)
x = []
y = []
for capteur in capteurs:
x.append(capteur[0])
y.append(capteur[1])
# fig1, (ax1, ax2) = plt.subplots(2, 1)
# fig1 = plt.figure(1, figsize = (5.91, 2.758))
# ax1 = fig1
np.empty([8, 500])
np.array([[]])
plt.xlabel('Temps')
plt.ylabel('Tension')