|
|
@ -1938,8 +1938,8 @@ reader(adder(printer())) <span class="hljs-comment"># 100, 101, ..., 109</span> |
|
|
|
<span class="hljs-keyword">from</span> matplotlib <span class="hljs-keyword">import</span> pyplot |
|
|
|
</code></pre></div> |
|
|
|
|
|
|
|
<pre><code class="python language-python hljs">pyplot.plot(<y_data>) <span class="hljs-comment"># X values start from 0.</span> |
|
|
|
pyplot.plot(<x_data>, <y_data>) <span class="hljs-comment"># Add `label=<str>` for legend.</span> |
|
|
|
<pre><code class="python language-python hljs">pyplot.plot(<y_data> [, label=<str>]) |
|
|
|
pyplot.plot(<x_data>, <y_data>) |
|
|
|
</code></pre> |
|
|
|
<pre><code class="python language-python hljs">pyplot.legend() <span class="hljs-comment"># Adds a legend.</span> |
|
|
|
pyplot.savefig(<filename>) <span class="hljs-comment"># Saves figure.</span> |
|
|
|