CoreGraphics approach to graphing