div>
</div>
<p>To transform this into an ndata, we assign <em>y</em> as the data, and label it with <em>x</em> as the axis label.</p>
<div class="doctest highlight-default notranslate"><div class="highlight"><pre><span></span><span class="gp">&gt;&gt;&gt; </span><span class="n">d</span> <span class="o">=</span> <span class="n">nddata</span><span class="p">(</span><span class="n">y</span><span class="p">,</span><span class="s1">&#39;x&#39;</span><span class="p">)</span><span class="o">.</span><span class="n"