how to take 2 .txt files and plot them on a graph using python?
<p>I'm trying to figure out how to take two text files filled with comma-seperated values and find their point average. Here's roughly my values that I have from my two files:</p>

<p>file 1</p>

<pre><code>1,24.5

2,24.2

3,27.3

.....

50,25.2
</code></pre>

<p>file 2</p>

<pre><code>1,23.4

2,23.4

3,18.9

.....

50,27.0
</code></pre>

<p>And my code:</p>

<pre><code>import matplotlib.pyplot as plt
import numpy as np

x, y = np.loadtxt('C:\\Users\\user\\Desktop\\data\\input_temperature1.txt', delimiter=',', unpack=True)
plt.plot(x,y, color='Blue', label='Input temperature 1')

x, y = np.loadtxt('C:\\Users\\user\\Desktop\\data\\input_temperature2.txt', delimiter=',', unpack=True)
plt.plot(x,y,color='Red', label='Input temperature 2')

plt.xlabel('x')
plt.ylabel('y')
plt.title('Temperature Comparioson Plot')
plt.legend()
plt.show()
</code></pre>

<p>I have no clue where to go from here or what to do. Any help would be greatly appreciated!</p>