i am developing one app in iPhone in that application i want smooth curve using core plot frame work.can any one suggest how to implement smooth curve
thanks in advance.
A new interpolation mode, CPTScatterPlotInterpolationCurved, was added after the 1.0 release. It will draw bezier curves between each point in the scatter plot. You can get support for it by pulling the latest code with Mercurial or wait for the next release.
Related
I am able to plot a curve, but it is not smooth. In fact, it is totally distracted and wavy. Can anyone help me or suggest a method to make that curve line smooth?
Thanks in advance.
A new option was added to the Core Plot framework after the 1.0 release that draws scatter plots with a smoothed line. You'll need to get the latest code with Mercurial or wait for the next release, currently unscheduled.
plot.interpolation = CPTScatterPlotInterpolationCurved;
I'm new to this core-plot framework and trying to draw a line graph based on X and Y acceleration. I can already get my X and Y values and have successfully added core-plot in my project. I'm quite lost on how to start this, so basically, I will have X and Y values and how do I plot this using core-plot? any help is suggested. Thanks!
Maybe my answer is a little bit off topic, as it's not using core-plot, but did you look at the "AccelerometerGraph" sample app provided with Xcode?
It provides a nice plot which is dynamically updated while new accelerometer events are registered. The great of this sample is the way CoreAnimation has been used to "speed-up" Quartz2D. And you get all of this using system framework only and no third party code (apart your adaptation of Apple's one).
Look at the Core Plot examples to see how to set up a basic graph. You'll want to use a scatter plot. Call -reloadData on the plot whenever you have new data to display. If only some of the data points change on each frame, you can use the following methods to do a partial update:
-(void)reloadDataInIndexRange:(NSRange)indexRange;
-(void)insertDataAtIndex:(NSUInteger)index
numberOfRecords:(NSUInteger)numberOfRecords;
-(void)deleteDataInIndexRange:(NSRange)indexRange;
The Real Time Plot in the Plot Gallery example app shows one way to use these methods.
iPhone sdk :Does any Framework Support User to draw "candle graph" in iphone sdk?
I have tried following framework:
MIMChart-Library
CorePlot
But it seems not example to show that how to draw Candle Graph......
Or user need to customize by ourself?
Because i am trying to draw candle graph by some framework,
i understand that i has not much Framework support draw candle graph , because it is little bit hard to draw...
Core Plot can draw candlestick plots. The Plot Gallery example app includes one.
everyone.
I just found that there has a example code in CorePlot named "AAPLot"
It seems like the Candlestick plots we are looking at in Stock Market....
Hope this reference can help you guys. :]
Here is my question , I want to create a soccer match team formation for an app base on the X and Y coordinates return.
Does anyone have the example or tutorial?
There is a really good framework for plotting called Core Plot. I tried that before, it's a great framework you can draw plot like you deal with TableView. If you serious about plotting the you should have a look at it. If not then it maybe a bit over-kill.
Can someone give me some good tutorials on Creating a 2D plot on IPhone given a variable number of x,y coordinates?
If you're looking for something beyond just plotting the points, check out the open source Core Plot framework for Mac and iPhone. It's still a young project, but it can handle a scatter plot (with or without lines between the points) along with labeled axes just fine. There are a number of example programs included with the framework that demonstrate some of its capabilities.
You can do this with the CGContextAddLineToPoint method.
http://developer.apple.com/iphone/library/documentation/GraphicsImaging/Conceptual/drawingwithquartz2d/dq_paths/dq_paths.html#//apple_ref/doc/uid/TP30001066-CH211