How can I create a line graph in CorePlot?

171 views
Skip to first unread message

Varun Lakshmanan

unread,
Feb 6, 2017, 7:14:29 AM2/6/17
to coreplot-discuss
I'm using the [CorePlot](https://github.com/core-plot/core-plot) framework and I'm having some trouble setting up a basic scatterplot. Essentially, I have an array of values that the user can add to over time. The scatterplot should graph all of the values in the array and connect them with a line (the color, thickness, etc of the line doesn't matter). If it matters, the graph will be in a secondary view controller and the data for the line graph will be imported from the main view controller. I've already looked through the examples provided and I've read [the tutorial on this website](https://web.archive.org/web/20120805115026/http://www.raywenderlich.com/13271/how-to-draw-graphs-with-core-plot-part-2), but neither help me in what I'm doing. 

Can I have step-by-step instructions with sample code (in Objective-C) on how to implement this line graph/scatterplot in my application? 

Eric

unread,
Feb 6, 2017, 7:21:53 AM2/6/17
to coreplot-discuss
Which part are you having trouble with? Setting up the graph? Updating the data over time?

Eric

Varun Lakshmanan

unread,
Feb 6, 2017, 12:13:51 PM2/6/17
to coreplot-discuss
I'm having trouble actually creating the graph, setting up the axes and lines, and integrating the data I need to graph.

I found [this tutorial](http://www.mobdevel.com/?p=96) online. Will it be sufficient for what I'm doing or is the code outdated?

Reply all
Reply to author
Forward
0 new messages