plt.plot/bar/scatter(x_data, y_data [, label=<str>]) <spanclass="hljs-comment"># Also plt.plot(y_data).</span>
plt.legend() <spanclass="hljs-comment"># Adds a legend.</span>
plt.title/xlabel/ylabel(<str>) <spanclass="hljs-comment"># Adds a title or label.</span>
plt.legend() <spanclass="hljs-comment"># Adds a legend of labels.</span>
plt.title/xlabel/ylabel(<str>) <spanclass="hljs-comment"># Adds title or axis label.</span>
plt.show() <spanclass="hljs-comment"># Also plt.savefig(<path>).</span>
plt.clf() <spanclass="hljs-comment"># Clears the plot.</span>
plt.clf() <spanclass="hljs-comment"># Clears the plot (figure).</span>
</code></pre></div>
<div><h2id="table"><ahref="#table"name="table">#</a>Table</h2><div><h4id="printsacsvspreadsheettotheconsole">Prints a CSV spreadsheet to the console:</h4><pre><codeclass="python language-python hljs"><spanclass="hljs-comment"># $ pip3 install tabulate</span>
@ -2051,16 +2051,16 @@ window.close()
<div><h2id="scraping"><ahref="#scraping"name="scraping">#</a>Scraping</h2><div><h4id="scrapespythonsurlandlogofromitswikipediapage">Scrapes Python's URL and logo from its Wikipedia page:</h4><pre><codeclass="python language-python hljs"><spanclass="hljs-comment"># $ pip3 install requests beautifulsoup4</span>
<spanclass="hljs-keyword">import</span> requests, bs4, os