Core Plot and WWDC

CorePlotLogo.png

We're coming up on Apple's Worldwide Developer Conference (WWDC) once again, and I'll be there like I was last year. I'm looking forward to meeting all the people I've been introduced to online since I launched my little software company last year.

One other exciting element to this year's WWDC is the fact that Apple is hosting a code-a-thon onsite for a new open source framework called Core Plot. I'll be one of the coordinators of this framework, so if you're there at the conference you can probably find me in the Core Plot room. I'll be the one with the red hair wearing a black Sunset Lake Software T-shirt.

Core Plot was organized by Drew McCormack (of MacResearch and the Mental Faculty) around the idea that we need a good BSD-licensed Mac / iPhone plotting and charting framework. Too many people were rolling their own application-specific implementations, and it seemed like a lot of work was being wasted. The original call to arms for the project pulled in a good number of interested developers, and progress has been fairly rapid.

The framework now has barebones support for doing scatter and line plots with axes. Two sample applications have been constructed to show off the framework, one for Mac and the other for iPhone. The same API is used for both platforms, due to the decision to build the framework on top of Core Animation. Not only does that structure give us access to neat visual effects and fast rendering, but the low-level Core Animation classes and data types are almost identical between Leopard's Cocoa and Cocoa Touch.

There is a lot of work left to do, so don't expect this to be able to do all of the charts that Excel or Origin handles right now. However, as I said earlier, this project is advancing quickly and should take a large step during WWDC.

For those looking to test out the framework or start looking at the code, we have a nice documentation set hosted at the Google Code repository, including a getting started article that should take you through the process of grabbing the code, compiling it, and even adding the framework to your own Mac or iPhone application. It also explains a little bit of the philosophy behind the design and why we're so keen on integrating unit tests. Anybody attending WWDC is more than welcome to stop by the Core Plot development room (which should be shown on the overhead monitors) and join in. We'll be there to show you how to contribute or how to start using the framework itself.

I've been excited about the this year's conference for months and I think it will be a great experience. I hope to see you there.

Comments

Naive question here, but why not create a new terminal type for gnuplot? I just did a size on gnuplot on my intel macbook:

size /opt/local/bin/gnuplot
__TEXT	__DATA	__OBJC	others	dec	hex
1126400	90112	4096	102400	1323008	143000

It seems like it could be wrapped for cocoa, as was done for python etc.
The number of person-years invested in gnuplot must be huge, if you expect to match it in a timely fashion, I would say that is impossible. But leveraging gnuplot, now that seems possible by experienced coders. But I am an old fortran coder. :-)

Wrapping a command-line tool would be unacceptable for what we're trying to do here. We want drop-in user interface elements that can be used in any Cocoa application on Mac or iPhone and can be set up by developers in a manner similar to how table views and the like are used right now. We don't just want to generate static images to be hosted within a larger user interface.

By leveraging modern Cocoa technologies like Core Animation, we will be able to provide crisp graphics that can be animated around or interacted with in many ways. To do this requires building our own framework from the ground up.

There are also performance and portability concerns with bringing something like Gnuplot across to the iPhone.

Quite frankly, Cocoa gives us a lot for free, which makes writing something like this require far fewer lines of code than a library like Gnuplot. In a matter of months we've been able to produce some impressive-looking graph elements, such as the ones shown here.

Will this also work with the google G1? If so, my team could build upon it.

No, this requires Apple-specific frameworks like Core Animation to work. You might as well write your own implementation from scratch for Android, given how different of a development environment it presents.

Syndicate content