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')[4] for row in data] |
14 |
|
15 |
fig = plt.figure() |
16 |
|
17 |
ax1 = fig.add_subplot(111) |
18 |
|
19 |
ax1.set_title("Heat Capacity profile") |
20 |
ax1.set_xlabel('Temperature [K]') |
21 |
ax1.set_ylabel('Heat Capacity [J/kg/K]') |
22 |
|
23 |
ax1.plot(x,y, c='r') |
24 |
|
25 |
leg = ax1.legend() |
26 |
|
27 |
plt.show() |
28 |
|
29 |
|
30 |
|
31 |
|