Skip to content

Commit f66e4e7

Browse files
committed
Update the documentation index
1 parent a1fbcc0 commit f66e4e7

21 files changed

Lines changed: 64 additions & 44 deletions

docs/.doctrees/environment.pickle

243 Bytes
Binary file not shown.

docs/.doctrees/index.doctree

1.2 KB
Binary file not shown.

docs/.doctrees/timeseries.doctree

416 Bytes
Binary file not shown.
772 KB
Loading

docs/_images/0-multiplex-style.png

791 KB
Loading

docs/_images/2-simple-text.png

212 KB
Loading

docs/_images/3-time-series.png

-157 Bytes
Loading

docs/_images/4-marvel.png

180 KB
Loading

docs/_sources/index.rst.txt

Lines changed: 16 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -56,6 +56,9 @@ Why Multiplex?
5656

5757
If Multiplex is based on matplotlib, why not use matplotlib directly?
5858

59+
.. image:: ../examples/exports/0-multiplex-dark-style.png
60+
:class: example
61+
5962
Multiplex does not replace matplotlib.
6063
Anything that you can do with Multiplex, you can also do with matplotlib.
6164
What Multiplex does is make it easier to create beautiful visualizations.
@@ -73,18 +76,23 @@ For example, you can create a text visualization with a simple function call, in
7376
import matplotlib.pyplot as plt
7477
from multiplex import drawable
7578
plt.style.use(os.path.join(sys.path[0], '..', 'styles', "multiplex.style"))
76-
viz = drawable.Drawable(plt.figure(figsize=(10, 1)))
77-
text = 'Lorem ipsum dolor sit amet, consectetur adipiscing elit.'
78-
viz.draw_text_annotation(text, align='justify', fontfamily='serif', fontsize='large', lpad=0.1, rpad=0.1)
79-
viz.set_title('Text visualization', loc='left')
80-
viz.set_caption("It doesn't take much to create text visualizations with Multiplex!")
79+
viz = drawable.Drawable(plt.figure(figsize=(10, 2)))
80+
paragraph = """Anthony Lopes is a Portuguese professional footballer who plays for Olympique Lyonnais as a goalkeeper. He came through the youth ranks at Lyon, being called to the first team in 2011 and making his debut the following year."""
81+
style = { 'align': 'justify', 'fontfamily': 'serif', 'alpha': 0.9, 'lineheight': 1.25, 'lpad': 0.1, 'rpad': 0.1 }
82+
viz.draw_text_annotation(paragraph, **style)
83+
viz.set_title('Profile: Anthony Lopes', loc='left')
84+
viz.set_caption("""Wikipedia is a useful repository to get more information about anything. Below is an excerpt from the Wikipedia profile of footballer Anthony Lopes.""")
8185
plt.show()
8286
83-
All it takes to draw a simple text visualization is 9 lines of code:
87+
.. image:: ../examples/exports/2-simple-text.png
88+
:class: center
89+
:width: 62%
90+
91+
All it takes to draw a simple text visualization is 10 lines of code:
8492

8593
1. Three lines to import matplotlib, Multiplex and the visualization style;
86-
2. Set up the visualization object;
87-
3. Draw and show the visualization, including a title and caption.
94+
2. Three lines to set up the visualization object, load the data and set the style;
95+
3. Four lines to draw and show the visualization, including a title and caption.
8896

8997
Multiplex abstracts the tedious process of manually programming which elements go where, and lets you create beautiful visualizations with ease.
9098

docs/index.html

Lines changed: 21 additions & 17 deletions
Original file line numberDiff line numberDiff line change
@@ -199,6 +199,7 @@ <h2>Why Multiplex?<a class="headerlink" href="#why-multiplex" title="Permalink t
199199
<blockquote>
200200
<div><p>If Multiplex is based on matplotlib, why not use matplotlib directly?</p>
201201
</div></blockquote>
202+
<img alt="_images/0-multiplex-dark-style.png" class="example" src="_images/0-multiplex-dark-style.png" />
202203
<p>Multiplex does not replace matplotlib.
203204
Anything that you can do with Multiplex, you can also do with matplotlib.
204205
What Multiplex does is make it easier to create beautiful visualizations.
@@ -209,31 +210,34 @@ <h2>Why Multiplex?<a class="headerlink" href="#why-multiplex" title="Permalink t
209210
<li><p>New types of visualizations not available in matplotlib, such as the graph and text-based visualizations.</p></li>
210211
</ul>
211212
<p>For example, you can create a text visualization with a simple function call, including all styling options:</p>
212-
<div class="highlight-python notranslate"><table class="highlighttable"><tr><td class="linenos"><div class="linenodiv"><pre>1
213-
2
214-
3
215-
4
216-
5
217-
6
218-
7
219-
8
220-
9</pre></div></td><td class="code"><div class="highlight"><pre><span></span><span class="kn">import</span> <span class="nn">matplotlib.pyplot</span> <span class="kn">as</span> <span class="nn">plt</span>
213+
<div class="highlight-python notranslate"><table class="highlighttable"><tr><td class="linenos"><div class="linenodiv"><pre> 1
214+
2
215+
3
216+
4
217+
5
218+
6
219+
7
220+
8
221+
9
222+
10</pre></div></td><td class="code"><div class="highlight"><pre><span></span><span class="kn">import</span> <span class="nn">matplotlib.pyplot</span> <span class="kn">as</span> <span class="nn">plt</span>
221223
<span class="kn">from</span> <span class="nn">multiplex</span> <span class="kn">import</span> <span class="n">drawable</span>
222224
<span class="n">plt</span><span class="o">.</span><span class="n">style</span><span class="o">.</span><span class="n">use</span><span class="p">(</span><span class="n">os</span><span class="o">.</span><span class="n">path</span><span class="o">.</span><span class="n">join</span><span class="p">(</span><span class="n">sys</span><span class="o">.</span><span class="n">path</span><span class="p">[</span><span class="mi">0</span><span class="p">],</span> <span class="s1">&#39;..&#39;</span><span class="p">,</span> <span class="s1">&#39;styles&#39;</span><span class="p">,</span> <span class="s2">&quot;multiplex.style&quot;</span><span class="p">))</span>
223-
<span class="n">viz</span> <span class="o">=</span> <span class="n">drawable</span><span class="o">.</span><span class="n">Drawable</span><span class="p">(</span><span class="n">plt</span><span class="o">.</span><span class="n">figure</span><span class="p">(</span><span class="n">figsize</span><span class="o">=</span><span class="p">(</span><span class="mi">10</span><span class="p">,</span> <span class="mi">1</span><span class="p">)))</span>
224-
<span class="n">text</span> <span class="o">=</span> <span class="s1">&#39;Lorem ipsum dolor sit amet, consectetur adipiscing elit.&#39;</span>
225-
<span class="n">viz</span><span class="o">.</span><span class="n">draw_text_annotation</span><span class="p">(</span><span class="n">text</span><span class="p">,</span> <span class="n">align</span><span class="o">=</span><span class="s1">&#39;justify&#39;</span><span class="p">,</span> <span class="n">fontfamily</span><span class="o">=</span><span class="s1">&#39;serif&#39;</span><span class="p">,</span> <span class="n">fontsize</span><span class="o">=</span><span class="s1">&#39;large&#39;</span><span class="p">,</span> <span class="n">lpad</span><span class="o">=</span><span class="mf">0.1</span><span class="p">,</span> <span class="n">rpad</span><span class="o">=</span><span class="mf">0.1</span><span class="p">)</span>
226-
<span class="n">viz</span><span class="o">.</span><span class="n">set_title</span><span class="p">(</span><span class="s1">&#39;Text visualization&#39;</span><span class="p">,</span> <span class="n">loc</span><span class="o">=</span><span class="s1">&#39;left&#39;</span><span class="p">)</span>
227-
<span class="n">viz</span><span class="o">.</span><span class="n">set_caption</span><span class="p">(</span><span class="s2">&quot;It doesn&#39;t take much to create text visualizations with Multiplex!&quot;</span><span class="p">)</span>
225+
<span class="n">viz</span> <span class="o">=</span> <span class="n">drawable</span><span class="o">.</span><span class="n">Drawable</span><span class="p">(</span><span class="n">plt</span><span class="o">.</span><span class="n">figure</span><span class="p">(</span><span class="n">figsize</span><span class="o">=</span><span class="p">(</span><span class="mi">10</span><span class="p">,</span> <span class="mi">2</span><span class="p">)))</span>
226+
<span class="n">paragraph</span> <span class="o">=</span> <span class="s2">&quot;&quot;&quot;Anthony Lopes is a Portuguese professional footballer who plays for Olympique Lyonnais as a goalkeeper. He came through the youth ranks at Lyon, being called to the first team in 2011 and making his debut the following year.&quot;&quot;&quot;</span>
227+
<span class="n">style</span> <span class="o">=</span> <span class="p">{</span> <span class="s1">&#39;align&#39;</span><span class="p">:</span> <span class="s1">&#39;justify&#39;</span><span class="p">,</span> <span class="s1">&#39;fontfamily&#39;</span><span class="p">:</span> <span class="s1">&#39;serif&#39;</span><span class="p">,</span> <span class="s1">&#39;alpha&#39;</span><span class="p">:</span> <span class="mf">0.9</span><span class="p">,</span> <span class="s1">&#39;lineheight&#39;</span><span class="p">:</span> <span class="mf">1.25</span><span class="p">,</span> <span class="s1">&#39;lpad&#39;</span><span class="p">:</span> <span class="mf">0.1</span><span class="p">,</span> <span class="s1">&#39;rpad&#39;</span><span class="p">:</span> <span class="mf">0.1</span> <span class="p">}</span>
228+
<span class="n">viz</span><span class="o">.</span><span class="n">draw_text_annotation</span><span class="p">(</span><span class="n">paragraph</span><span class="p">,</span> <span class="o">**</span><span class="n">style</span><span class="p">)</span>
229+
<span class="n">viz</span><span class="o">.</span><span class="n">set_title</span><span class="p">(</span><span class="s1">&#39;Profile: Anthony Lopes&#39;</span><span class="p">,</span> <span class="n">loc</span><span class="o">=</span><span class="s1">&#39;left&#39;</span><span class="p">)</span>
230+
<span class="n">viz</span><span class="o">.</span><span class="n">set_caption</span><span class="p">(</span><span class="s2">&quot;&quot;&quot;Wikipedia is a useful repository to get more information about anything. Below is an excerpt from the Wikipedia profile of footballer Anthony Lopes.&quot;&quot;&quot;</span><span class="p">)</span>
228231
<span class="n">plt</span><span class="o">.</span><span class="n">show</span><span class="p">()</span>
229232
</pre></div>
230233
</td></tr></table></div>
231-
<p>All it takes to draw a simple text visualization is 9 lines of code:</p>
234+
<a class="center reference internal image-reference" href="_images/2-simple-text.png"><img alt="_images/2-simple-text.png" class="center" src="_images/2-simple-text.png" style="width: 62%;" /></a>
235+
<p>All it takes to draw a simple text visualization is 10 lines of code:</p>
232236
<blockquote>
233237
<div><ol class="arabic simple">
234238
<li><p>Three lines to import matplotlib, Multiplex and the visualization style;</p></li>
235-
<li><p>Set up the visualization object;</p></li>
236-
<li><p>Draw and show the visualization, including a title and caption.</p></li>
239+
<li><p>Three lines to set up the visualization object, load the data and set the style;</p></li>
240+
<li><p>Four lines to draw and show the visualization, including a title and caption.</p></li>
237241
</ol>
238242
</div></blockquote>
239243
<p>Multiplex abstracts the tedious process of manually programming which elements go where, and lets you create beautiful visualizations with ease.</p>

0 commit comments

Comments
 (0)