 convert the grid coordinates into plot</span>
    <span class="co"># coordinates. Use global assignment.</span>
    <span class="va">polygon_coords</span> <span class="op">&lt;&lt;-</span> <span class="fu"><a href="https://rdrr.io/r/base/lapply.html">lapply</a></span><span class="op">(</span><span class="va">xspline_points</span>, <span class="kw">function</span><span class="op">(</span><span class="va">pts</span><span class="op">)</span> <span class="op">{</span>
      <span class="va">x_trans</span> <spa