0

I want to plot a line going on with a calculation. For instance: I have got a function like a,b = Update(), and just below the calculation I would like to plot the newly calculated points(a,b), what kind of lib should I use in Python?

a,b = Update()# a, b are just a float value, or maybe an array so a,b can combine to form a group of points
points(a,b)

I am a newly Python starter, so...

anon582847382
  • 19,907
  • 5
  • 54
  • 57
Jin Li
  • 9
  • 1
  • 1
    check out [matplotlib](http://matplotlib.org/) – Mark Mikofski Nov 04 '13 at 16:45
  • Yes, use `Matplotlib`. Have 2 lists with, each storing the values. When a new value is added delete the old and create a new plot with the new data and redraw the figure. – Aleksander Lidtke Nov 04 '13 at 16:48
  • `arrays` don't really exist in python, use lists. Arrays do exist in `Numpy` (a very useful library) but they data cannot be easily appended to them. Whereas with list you can just do: a=[1,2,3]; a.append(4)` which gives `[1,2,3,4]`. – Aleksander Lidtke Nov 04 '13 at 16:50
  • thanks, but ideally is to plot dynamically while getting more date of points. Is there some solution? – Jin Li Nov 07 '13 at 18:03

0 Answers0