retrieving data from a plot in python.

D

Debashish Saha

suppose I have t= [0,7,10,17,23,29,31] f_t= [4,3,11,19,12,9,17] and I have
plotted f_t vs t.

Now from this 7 data points plotting if I want to retrieve 100 data points
and save them in a text file. What do I have to do?

What I am asking is not a fitting of the plot. I know between two points
plot is linear.

What I am asking If I create a array like t=np.arange(0,31,.1) ,then what
is the corresponding array of f_t which agrees well with the previous
plot,i.e,for any t between t=0 to t=7, f_t will be determined by using a
straight line connecting (0,4) and (7,3) and so on.
 
G

Grant Edwards

suppose I have t= [0,7,10,17,23,29,31] f_t= [4,3,11,19,12,9,17] and I have
plotted f_t vs t.

Now from this 7 data points plotting if I want to retrieve 100 data points
and save them in a text file. What do I have to do?

What I am asking is not a fitting of the plot. I know between two points
plot is linear.

It is if that's how you plotted it.
What I am asking If I create a array like t=np.arange(0,31,.1) ,then what
is the corresponding array of f_t which agrees well with the previous
plot,i.e,for any t between t=0 to t=7, f_t will be determined by using a
straight line connecting (0,4) and (7,3) and so on.

It sounds to me like you're asking how to do linear interpolation

http://en.wikipedia.org/wiki/Linear_interpolation

But that's a type of curve fitting, and you specifically said you're
not asking about curve fitting -- so you've lost me.
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

Forum statistics

Threads
473,768
Messages
2,569,574
Members
45,050
Latest member
AngelS122

Latest Threads

Top