title: How do I draw a graph in my application?
body: <p>I need to incorporate a graph into my android application, I am trying to follow this tutorial:</p>
  
  <p><a href="http://www.jjoe64.com/2011/07/chart-and-graph-library-for-android.html" rel="nofollow">http://www.jjoe64.com/2011/07/chart-and-graph-library-for-android.html</a></p>
  
  <p>I tried putting it into my activity class and it shows up with a ton of errors related to <code>GraphView</code>. Here are the snippets of code:</p>
  
  <pre><code>// graph with dynamically genereated horizontal and vertical labels   
  GraphView graphView = new GraphView(   
    this // context   
    , new GraphViewData[] {   
      new GraphViewData(1, 2.0d)   
      , new GraphViewData(2, 1.5d)   
      , new GraphViewData(2.5, 3.0d) // another frequency   
      , new GraphViewData(3, 2.5d)   
      , new GraphViewData(4, 1.0d)   
      , new GraphViewData(5, 3.0d)   
    } // data   
    , "GraphViewDemo" // heading   
    , null // dynamic labels   
    , null // dynamic labels   
  );   
  LinearLayout layout = (LinearLayout) findViewById(R.id.graph1);   
  layout.addView(graphView);
  </code></pre>