Q:

plotting values from different rows in a file using matplotlib in python

I have a file with several rows in the format of: 

value1   vlaue2  value3 
value1   vlaue2  value3  
value1   vlaue2 value3
value1   vlaue2     value3

I wish to plot this file in a single graph in such a way that for each row the x axis values from value1 to value2 will have y axis values as value3.
How do I do this in python using matplotlib?
I am new to python and can't think of how to begin this?

A:

I did not want to write code for you but I think a small trial could help us understand what you are looking for. Is it close to the results you want to obtain given the input values ?
import matplotlib.pyplot as plt

values = [
            [0,3,2],
            [3,8,5],
            [8,12,4],
            [12,18,3]
        ]
y = list()
x = list()
for inter in values :
    y+=range(inter[0], inter[1])
    for x_val in range(inter[0], inter[1]) :
        x.append(inter[2])
print x
print y
plt.figure(1)
plt.plot(y,x)
plt.show()

