functions added

This commit is contained in:
theo.canaud 2022-06-17 10:26:01 +02:00
parent aafd732599
commit d63c9cb8df

View file

@ -9,22 +9,18 @@ import csv
#! /usr/bin/env python3 #! /usr/bin/env python3
# -*- coding: UTF-8 -*- # -*- coding: UTF-8 -*-
def tab():
with open('../RawDataFiles/RawData1.csv', 'r') as f: with open('../RawDataFiles/RawData1.csv', 'r') as f:
data = csv.reader(f, quoting = csv.QUOTE_MINIMAL) data = csv.reader(f, quoting = csv.QUOTE_MINIMAL)
data2 = [data2 for data2 in data] data2 = [data2 for data2 in data]
data_array = np.asarray(data2) data_array = np.asarray(data2)
print(data_array[:,5]) print(data_array[:,5])
# for lign in data: def graph():
# print(lign)
# print("\n")
# dataset = np.loadtxt('../RawDataFiles/RawData1.csv', delimiter='\t', dtype='str')
# print(dataset)
plt.xlabel('Temps') plt.xlabel('Temps')
plt.ylabel('Tension') plt.ylabel('Tension')
plt.title("Données tableau 1") plt.title("Données tableau 1")
plt.plot(x, y, color = 'r') plt.plot(x, y, color = 'r')
plt.show() #Affichage du plot plt.show() #Affichage du plot
tab()