retrieving data from a plot in python.

Discussion in 'Python' started by Debashish Saha, Apr 9, 2013.

  1. 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.
    Debashish Saha, Apr 9, 2013
    #1
    1. Advertising

  2. On 2013-04-09, Debashish Saha <> wrote:
    > 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.

    --
    Grant Edwards grant.b.edwards Yow! I just went below the
    at poverty line!
    gmail.com
    Grant Edwards, Apr 9, 2013
    #2
    1. Advertising

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

It takes just 2 minutes to sign up (and it's free!). Just click the sign up button to choose a username and then you can ask your own questions on the forum.
Similar Threads
  1. ¶}¾Ç¤F¶Ü?

    plot two data sets on gnuplot

    ¶}¾Ç¤F¶Ü?, May 10, 2004, in forum: Python
    Replies:
    2
    Views:
    949
    Fernando Perez
    May 15, 2004
  2. Evagelia Tsiligianni

    plot dates, print plotted data

    Evagelia Tsiligianni, Jun 21, 2004, in forum: Python
    Replies:
    2
    Views:
    374
    David Fraser
    Jun 23, 2004
  3. Dr. Colombes
    Replies:
    1
    Views:
    1,015
    John Hunter
    Feb 10, 2005
  4. N/A
    Replies:
    0
    Views:
    791
  5. Gary Herron
    Replies:
    0
    Views:
    156
    Gary Herron
    Apr 9, 2013
Loading...

Share This Page