I was looking for a graphing solution for iOS when I ran across a great project called Core Plot. According to the overview it is described as a 2D plotting framework for Mac OS X and iOS. It is highly customizable and capable of drawing many types of plots.
The project is well organized and includes some nice iOS API documentation. I started by looking for a tutorial and found a comprehensive one on Ray Wenderlich’s site. Steve Baranski wrote a detailed article in 2 parts on using Core Plot titled “How To Draw Graphs with Core Plot” – Part 1 and Part 2.
I decided to create an iPad demo project which I call “Algorithms” and release it to GitHub.
My first use of Core Plot was to simulate the rolling of 2 dice, graphing the number of times that the roll counts 2-12 come up.
Horizontal Label positioning
For the X axis, I needed labels with the text “2” through “12”.