27 lines
597 B
Python
27 lines
597 B
Python
|
#!/usr/bin/env python3
|
||
|
|
||
|
import subprocess
|
||
|
|
||
|
import matplotlib.pyplot as plt
|
||
|
|
||
|
# Run the command and get the standard output
|
||
|
h_t = subprocess.run(
|
||
|
"curl -Ls https://gitlab.rlp.net/mobitar/julia_course/-/raw/main/Day_3/resources/fitting_task_data.csv | tail -n +6 | head -n -2 | cut -d ',' -f 1,3",
|
||
|
shell=True,
|
||
|
capture_output=True,
|
||
|
text=True,
|
||
|
).stdout
|
||
|
|
||
|
h_values = []
|
||
|
t_values = []
|
||
|
|
||
|
for line in h_t.strip().split("\n"):
|
||
|
h, t = line.strip().split(",")
|
||
|
h_values.append(h)
|
||
|
t_values.append(t)
|
||
|
|
||
|
plt.plot(h_values, t_values)
|
||
|
plt.xlabel("h")
|
||
|
plt.ylabel("t")
|
||
|
plt.savefig("h_t.pdf")
|