Skip to content

Commit d58eda5

Browse files
committed
Plot
1 parent 2defa25 commit d58eda5

File tree

2 files changed

+4
-12
lines changed

2 files changed

+4
-12
lines changed

README.md

Lines changed: 0 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -2238,14 +2238,8 @@ Plot
22382238
```python
22392239
# $ pip3 install matplotlib
22402240
from matplotlib import pyplot
2241-
```
2242-
2243-
```python
22442241
pyplot.plot(<y_data> [, label=<str>])
22452242
pyplot.plot(<x_data>, <y_data>)
2246-
```
2247-
2248-
```python
22492243
pyplot.legend() # Adds a legend.
22502244
pyplot.savefig(<filename>) # Saves figure.
22512245
pyplot.show() # Displays figure.

index.html

Lines changed: 4 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -1936,16 +1936,14 @@
19361936

19371937
<div><h2 id="plot"><a href="#plot" name="plot">#</a>Plot</h2><pre><code class="python language-python hljs"><span class="hljs-comment"># $ pip3 install matplotlib</span>
19381938
<span class="hljs-keyword">from</span> matplotlib <span class="hljs-keyword">import</span> pyplot
1939-
</code></pre></div>
1940-
1941-
<pre><code class="python language-python hljs">pyplot.plot(&lt;y_data&gt; [, label=&lt;str&gt;])
1939+
pyplot.plot(&lt;y_data&gt; [, label=&lt;str&gt;])
19421940
pyplot.plot(&lt;x_data&gt;, &lt;y_data&gt;)
1943-
</code></pre>
1944-
<pre><code class="python language-python hljs">pyplot.legend() <span class="hljs-comment"># Adds a legend.</span>
1941+
pyplot.legend() <span class="hljs-comment"># Adds a legend.</span>
19451942
pyplot.savefig(&lt;filename&gt;) <span class="hljs-comment"># Saves figure.</span>
19461943
pyplot.show() <span class="hljs-comment"># Displays figure.</span>
19471944
pyplot.clf() <span class="hljs-comment"># Clears figure.</span>
1948-
</code></pre>
1945+
</code></pre></div>
1946+
19491947
<div><h2 id="table"><a href="#table" name="table">#</a>Table</h2><div><h4 id="printsacsvfileasanasciitable">Prints a CSV file as an ASCII table:</h4><pre><code class="python language-python hljs"><span class="hljs-comment"># $ pip3 install tabulate</span>
19501948
<span class="hljs-keyword">import</span> csv, tabulate
19511949
<span class="hljs-keyword">with</span> open(&lt;filename&gt;, encoding=<span class="hljs-string">'utf-8'</span>, newline=<span class="hljs-string">''</span>) <span class="hljs-keyword">as</span> file:

0 commit comments

Comments
 (0)