plt.legend()<spanclass="hljs-comment"># Adds a legend.</span>
plt.savefig(<path>)<spanclass="hljs-comment"># Saves the figure.</span>
plt.show()<spanclass="hljs-comment"># Displays the figure.</span>
plt.clf()<spanclass="hljs-comment"># Clears the figure.</span>
</code></pre></div>
</code></pre></div>
<div><h2id="table"><ahref="#table"name="table">#</a>Table</h2><div><h4id="printsacsvfileasanasciitable">Prints a CSV file as an ASCII table:</h4><pre><codeclass="python language-python hljs"><spanclass="hljs-comment"># $ pip3 install tabulate</span>
<div><h2id="table"><ahref="#table"name="table">#</a>Table</h2><div><h4id="printsacsvfileasanasciitable">Prints a CSV file as an ASCII table:</h4><pre><codeclass="python language-python hljs"><spanclass="hljs-comment"># $ pip3 install tabulate</span>
@ -2228,16 +2228,16 @@ Line # Hits Time Per Hit % Time Line Contents
<div><h3id="callgraph">Call Graph</h3><div><h4id="generatesapngimageofacallgraphwithhighlightedbottlenecks">Generates a PNG image of a call graph with highlighted bottlenecks:</h4><pre><codeclass="python language-python hljs"><spanclass="hljs-comment"># $ pip3 install pycallgraph</span>
<div><h3id="callgraph">Call Graph</h3><div><h4id="generatesapngimageofacallgraphwithhighlightedbottlenecks">Generates a PNG image of a call graph with highlighted bottlenecks:</h4><pre><codeclass="python language-python hljs"><spanclass="hljs-comment"># $ pip3 install pycallgraph</span>
<li><strong>Use <codeclass="python hljs"><spanclass="hljs-string">'outline=<color>'</span></code> to set the secondary color.</strong></li>
<li><strong>Use <codeclass="python hljs"><spanclass="hljs-string">'outline=<color>'</span></code> to set the secondary color.</strong></li>
<li><strong>Color can be specified as an int, tuple, <codeclass="python hljs"><spanclass="hljs-string">'#rrggbb[aa]'</span></code> string or a color name.</strong></li>
<li><strong>Color can be specified as an int, tuple, <codeclass="python hljs"><spanclass="hljs-string">'#rrggbb[aa]'</span></code> string or a color name.</strong></li>
</ul>
</ul>
<div><h2id="animation"><ahref="#animation"name="animation">#</a>Animation</h2><div><h4id="createsagifofabouncingball">Creates a GIF of a bouncing ball:</h4><pre><codeclass="python language-python hljs"><spanclass="hljs-comment"># $ pip3 install pillow imageio</span>
<div><h2id="animation"><ahref="#animation"name="animation">#</a>Animation</h2><div><h4id="createsagifofabouncingball">Creates a GIF of a bouncing ball:</h4><pre><codeclass="python language-python hljs"><spanclass="hljs-comment"># $ pip3 install imageio</span>