So I've been going round in circles on this for the last day, and hoping someone can put me out of my misery.
I have a function f that depends on x and y values and when plotting f against y, gives the following figure.
Now each of the lines are for a value of x [0,1] and I feel there must be a way to colour/contour the plot such that it can easily be identified which line corresponds to what value of x. I've tried numerous searches, but have not found anything that helps in this instance.
The code to reproduce the data that gives my figure is as below. Any help would be great, as I feel I'm missing something glaringly obvious here.
import numpy as np
import matplotlib.pyplot as plt
y = np.linspace(0,100)
x = np.linspace(0,1,11)
f = np.zeros(( len(y), len(x) ))
for j in range(len(x)):
i=0
for r in y:
f[i,j] = (1000 + (-r * 2)) + (1000*(1-x[j]))
i += 1
plt.plot(f, y)