Cocoa Graphing/Plotting Framework on iOS

Cocoa Graphing/Plotting Framework on iOS

Core Plot

There's a plotting framework in active development on Core Plot.

It works on both Mac and iPhone.

Graph generation on iPhone

I have been keeping my eye on this one:

core-plot

but I haven't yet tried it. Though it seams like it has potential.

chris.

Is there a visualization framework like JUNG for iOS?

Best graph plotting library for iOS is Core plot. It is very powerful, and easy to understand.

But for simple graphs you can use s7graphview library also.

If you want to do it yourself, you can do custom drawing using Core graphics.

Creating Graphs on an iPad/iPhone

Core Plot is one popular option.

Drawing a simple graph on the iPhone

If you would attempt to draw yourself, you'd use the Path functions to draw in a context in Quartz

CGContextBeginPath(context);
CGContextMoveToPoint(context, startX, startY);
CGContextAddLineToPoint(context, nextX, nextY);
// [...] and so on, for all line segments
CGContextSetLineWidth(context, 2);
CGContextSetStrokeColorWithColor(context, [[UIColor blackColor] cgColor]);
CGContextStrokePath(context);

There is a lot of sample code to deal with context and drawing in quartz.

But there are probably some libraries to facilitate drawing graphs... someone else would have to help you with those though, not my cup of tea :)

Cocoa: create graphs

There's the newer, open source, Core Plot.

Objective-C Charting Framework

I use Core Plot. See this blog post for a tutorial.



Related Topics



Leave a reply



Submit