Skip to content

Commit e3b6022

Browse files
committed
new file
1 parent 94a3b59 commit e3b6022

File tree

1 file changed

+27
-0
lines changed

1 file changed

+27
-0
lines changed

src/Splitting_columns.py

Lines changed: 27 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,27 @@
1+
#!/usr/bin/env python3
2+
# -*- coding: utf-8 -*-
3+
4+
# open python file
5+
import numpy as np
6+
import pylab
7+
8+
infile = open("../data/xy.dat", "r")
9+
10+
# Initialise values
11+
x = []
12+
y = []
13+
14+
# Loop to perform sum
15+
for number in infile:
16+
a = (number.split(" "))
17+
# xy = map(float, line.split())
18+
x.append(float(a[0]))
19+
y.append(float(a[1]))
20+
21+
x_array = np.array(x)
22+
y_array = np.array(y)
23+
24+
pylab.plot(x_array,y_array)
25+
26+
print(np.min(y))
27+
print(np.max(y))

0 commit comments

Comments
 (0)