title: Ruby - How to create plot points
body: <p>I'm new to Ruby and I'm trying to create what is in essence a graph sheet by passing two values one for height and another for width. After creation I want to be able to call each point in on the graph individually. I know that I need to create a hash and or array to store each point on the graph however I'm not sure how I would iterate each value.</p>
  
  <p>For example</p>
  
  <pre><code>def graph_area(x, y)
      x = 4
      y = 2
      # Given the above info my graph would have 8 points
      # However I'm not sure how to make create an array that returns
      # {[x1, y1] =&gt; 1, [x1, y2] =&gt; 2, [x2, y1] =&gt; 3, [x2, y2]...} etc
  
      # output
      #     1234
      #     5678
  end
  </code></pre>
  
  <p>Is this approach even a practical one?</p>