收录日期:2019/12/09 08:46:04 时间:2010-12-10 20:42:47 标签:iphone,core-plot

I'm new to coreplot and not sure quite where to start. I would like to plot data points as they arrive. I'm recording finger touches and how long between each touch. I would like to plot them as they are happening.

Thanks for any pointers.

rd42

You can use the -insertDataAtIndex:numberOfRecords: method on your plot to add data points. The plot will call your datasource to load the new data. There is a corresponding delete method as well if you want to drop off the old data points. The alternative is to call -reloadData on the plot, but that's unnecessary if the old data points haven't changed.