title: Trouble with calling javascript function within another using D3
body: <p>I'm learning to use D3.js for some visualization ideas I have and I'm running into something that is probably quite easy and perhaps solely a javascript thing.</p>
  
  <p>I want to call a function from within another function.  I have created a basic scatter plot and want to reload it with new data points.  Here is the <a href="http://jsfiddle.net/dalebotha/7UPPq/8/" rel="nofollow">JSFiddle</a>. I'm really quite stumped!</p>
  
  <p>I think in it's simplest form it looks like this:</p>
  
  <pre><code>function firstFunction() {
      var something;
  }
  
  function secondFunction() {
      firstFunction();
  }
  </code></pre>
  
  <p>But it seems to sometimes works sometimes not and can't figure out why.</p>