Parent Directory
|
Revision Log
skype
1 | #!/usr/bin/python |
2 | |
3 | import numpy as np |
4 | import matplotlib.pyplot as plt |
5 | |
6 | with open("test_res.dat") as f: |
7 | data = f.read() |
8 | |
9 | data = data.split('\n') |
10 | del data[0] |
11 | del data[len(data)-1] |
12 | x = [row.split('\t')[0] for row in data] |
13 | y = [row.split('\t')[1] for row in data] |
14 | |
15 | fig = plt.figure() |
16 | |
17 | ax1 = fig.add_subplot(111) |
18 | |
19 | ax1.set_title("Cp profile") |
20 | ax1.set_xlabel('Temperature [K]') |
21 | ax1.set_ylabel('Cp [W/m/K]') |
22 | |
23 | ax1.plot(x,y, c='r') |
24 | |
25 | leg = ax1.legend() |
26 | |
27 | plt.show() |
28 | |
29 | |
30 | |
31 |
john.pye@anu.edu.au | ViewVC Help |
Powered by ViewVC 1.1.22 |