Skip to content

Commit

Permalink
python-data-science: updates after most recent course
Browse files Browse the repository at this point in the history
  • Loading branch information
marko-knoebl committed Aug 26, 2021
1 parent 2292815 commit 7623a0a
Show file tree
Hide file tree
Showing 41 changed files with 421 additions and 401 deletions.
2 changes: 1 addition & 1 deletion docs/index-collection-de.html

Large diffs are not rendered by default.

2 changes: 1 addition & 1 deletion docs/index-collection-en.html

Large diffs are not rendered by default.

2 changes: 1 addition & 1 deletion docs/python-and-data-science-all-collection-de.html

Large diffs are not rendered by default.

2 changes: 1 addition & 1 deletion docs/python-and-data-science-all-collection-en.html

Large diffs are not rendered by default.

2 changes: 1 addition & 1 deletion docs/python-data-science-2-pyplot-collection-de.html
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
<html lang="de" style="height:100%"><head><meta charSet="UTF-8"/><meta name="viewport" content="width=device-width, initial-scale=1.0"/><link rel="stylesheet" href="https://cdnjs.cloudflare.com/ajax/libs/twitter-bootstrap/4.3.1/css/bootstrap-reboot.min.css"/></head><body style="height:100%"><div style="height:100%;display:flex;align-items:stretch"><nav style="flex-basis:320px;overflow:auto;padding-top:4em;padding-left:1em;padding-right:1em;padding-bottom:0.5em;margin-bottom:0.5em"><div>parent topic: <a href="/slides/python-and-data-science-all-de.html">Python und Data Science</a></div><div><a href="python-data-science-2-pyplot-de.html">show presentation individually</a></div><section><h1>Python und Data Science: Pyplot</h1><ul><li><a href="/slides/python-data-science-2-pyplot-de.html#/0" target="content">Pyplot</a></li><li><a href="/slides/python-data-science-2-pyplot-de.html#/1" target="content">Plotting</a></li><li><a href="/slides/python-data-science-2-pyplot-de.html#/2" target="content">Pyplot: Konfiguration und Styling</a></li><li><a href="/slides/python-data-science-2-pyplot-de.html#/3" target="content">Pyplot API</a></li><li><a href="/slides/python-data-science-2-pyplot-de.html#/4" target="content">Gundlegende Plots</a></li><li><a href="/slides/python-data-science-2-pyplot-de.html#/5" target="content">Visualisierung von Iris-Daten</a></li><li><a href="/slides/python-data-science-2-pyplot-de.html#/6" target="content">Figure, Axes &amp; Subplots</a></li><li><a href="/slides/python-data-science-2-pyplot-de.html#/7" target="content">Weitere Plots</a></li><li><a href="/slides/python-data-science-2-pyplot-de.html#/8" target="content">Anzeigen von Bildern</a></li></ul></section></nav><main style="flex-grow:1"><iframe name="content" style="width:100%;height:100%;border:none"></iframe></main><button id="nav-toggle-button" style="position:absolute;top:1rem;left:1rem;padding:0.4em 0.8em;cursor:pointer;border-radius:0.25em;background-color:#0074d9;color:#ffffff;border:none">toggle sidebar</button><style>
<html lang="de" style="height:100%"><head><meta charSet="UTF-8"/><meta name="viewport" content="width=device-width, initial-scale=1.0"/><link rel="stylesheet" href="https://cdnjs.cloudflare.com/ajax/libs/twitter-bootstrap/4.3.1/css/bootstrap-reboot.min.css"/></head><body style="height:100%"><div style="height:100%;display:flex;align-items:stretch"><nav style="flex-basis:320px;overflow:auto;padding-top:4em;padding-left:1em;padding-right:1em;padding-bottom:0.5em;margin-bottom:0.5em"><div>parent topic: <a href="/slides/python-and-data-science-all-de.html">Python und Data Science</a></div><div><a href="python-data-science-2-pyplot-de.html">show presentation individually</a></div><section><h1>Python und Data Science: Pyplot</h1><ul><li><a href="/slides/python-data-science-2-pyplot-de.html#/0" target="content">Pyplot</a></li><li><a href="/slides/python-data-science-2-pyplot-de.html#/1" target="content">Plotting</a></li><li><a href="/slides/python-data-science-2-pyplot-de.html#/2" target="content">Pyplot: Konfiguration und Styling</a></li><li><a href="/slides/python-data-science-2-pyplot-de.html#/3" target="content">Pyplot API</a></li><li><a href="/slides/python-data-science-2-pyplot-de.html#/4" target="content">Gundlegende Plots</a></li><li><a href="/slides/python-data-science-2-pyplot-de.html#/5" target="content">Visualisierung von Iris-Daten</a></li><li><a href="/slides/python-data-science-2-pyplot-de.html#/6" target="content">Figure, Axes &amp; Subplots</a></li><li><a href="/slides/python-data-science-2-pyplot-de.html#/7" target="content">Weitere Plots</a></li><li><a href="/slides/python-data-science-2-pyplot-de.html#/8" target="content">Anzeigen von Bildern</a></li><li><a href="/slides/python-data-science-2-pyplot-de.html#/9" target="content">Artists</a></li></ul></section></nav><main style="flex-grow:1"><iframe name="content" style="width:100%;height:100%;border:none"></iframe></main><button id="nav-toggle-button" style="position:absolute;top:1rem;left:1rem;padding:0.4em 0.8em;cursor:pointer;border-radius:0.25em;background-color:#0074d9;color:#ffffff;border:none">toggle sidebar</button><style>
nav.hidden {
display: none;
}
Expand Down
2 changes: 1 addition & 1 deletion docs/python-data-science-2-pyplot-collection-en.html
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
<html lang="en" style="height:100%"><head><meta charSet="UTF-8"/><meta name="viewport" content="width=device-width, initial-scale=1.0"/><link rel="stylesheet" href="https://cdnjs.cloudflare.com/ajax/libs/twitter-bootstrap/4.3.1/css/bootstrap-reboot.min.css"/></head><body style="height:100%"><div style="height:100%;display:flex;align-items:stretch"><nav style="flex-basis:320px;overflow:auto;padding-top:4em;padding-left:1em;padding-right:1em;padding-bottom:0.5em;margin-bottom:0.5em"><div>parent topic: <a href="/slides/python-and-data-science-all-en.html">Python and Data Science</a></div><div><a href="python-data-science-2-pyplot-en.html">show presentation individually</a></div><section><h1>Python and Data Science: Pyplot</h1><ul><li><a href="/slides/python-data-science-2-pyplot-en.html#/0" target="content">Pyplot</a></li><li><a href="/slides/python-data-science-2-pyplot-en.html#/1" target="content">Plotting</a></li><li><a href="/slides/python-data-science-2-pyplot-en.html#/2" target="content">Pyplot: Configuration and Styling</a></li><li><a href="/slides/python-data-science-2-pyplot-en.html#/3" target="content">Pyplot API</a></li><li><a href="/slides/python-data-science-2-pyplot-en.html#/4" target="content">Basic plot types</a></li><li><a href="/slides/python-data-science-2-pyplot-en.html#/5" target="content">Basic plot types: visualizing iris data</a></li><li><a href="/slides/python-data-science-2-pyplot-en.html#/6" target="content">Pyplot: figure, axes &amp; subplots</a></li><li><a href="/slides/python-data-science-2-pyplot-en.html#/7" target="content">Advanced plot types</a></li><li><a href="/slides/python-data-science-2-pyplot-en.html#/8" target="content">Showing images</a></li></ul></section></nav><main style="flex-grow:1"><iframe name="content" style="width:100%;height:100%;border:none"></iframe></main><button id="nav-toggle-button" style="position:absolute;top:1rem;left:1rem;padding:0.4em 0.8em;cursor:pointer;border-radius:0.25em;background-color:#0074d9;color:#ffffff;border:none">toggle sidebar</button><style>
<html lang="en" style="height:100%"><head><meta charSet="UTF-8"/><meta name="viewport" content="width=device-width, initial-scale=1.0"/><link rel="stylesheet" href="https://cdnjs.cloudflare.com/ajax/libs/twitter-bootstrap/4.3.1/css/bootstrap-reboot.min.css"/></head><body style="height:100%"><div style="height:100%;display:flex;align-items:stretch"><nav style="flex-basis:320px;overflow:auto;padding-top:4em;padding-left:1em;padding-right:1em;padding-bottom:0.5em;margin-bottom:0.5em"><div>parent topic: <a href="/slides/python-and-data-science-all-en.html">Python and Data Science</a></div><div><a href="python-data-science-2-pyplot-en.html">show presentation individually</a></div><section><h1>Python and Data Science: Pyplot</h1><ul><li><a href="/slides/python-data-science-2-pyplot-en.html#/0" target="content">Pyplot</a></li><li><a href="/slides/python-data-science-2-pyplot-en.html#/1" target="content">Plotting</a></li><li><a href="/slides/python-data-science-2-pyplot-en.html#/2" target="content">Pyplot: Configuration and Styling</a></li><li><a href="/slides/python-data-science-2-pyplot-en.html#/3" target="content">Pyplot API</a></li><li><a href="/slides/python-data-science-2-pyplot-en.html#/4" target="content">Basic plot types</a></li><li><a href="/slides/python-data-science-2-pyplot-en.html#/5" target="content">Basic plot types: visualizing iris data</a></li><li><a href="/slides/python-data-science-2-pyplot-en.html#/6" target="content">Pyplot: figure, axes &amp; subplots</a></li><li><a href="/slides/python-data-science-2-pyplot-en.html#/7" target="content">Advanced plot types</a></li><li><a href="/slides/python-data-science-2-pyplot-en.html#/8" target="content">Showing images</a></li><li><a href="/slides/python-data-science-2-pyplot-en.html#/9" target="content">Artists</a></li></ul></section></nav><main style="flex-grow:1"><iframe name="content" style="width:100%;height:100%;border:none"></iframe></main><button id="nav-toggle-button" style="position:absolute;top:1rem;left:1rem;padding:0.4em 0.8em;cursor:pointer;border-radius:0.25em;background-color:#0074d9;color:#ffffff;border:none">toggle sidebar</button><style>
nav.hidden {
display: none;
}
Expand Down
27 changes: 25 additions & 2 deletions docs/python-data-science-2-pyplot-de.html
Original file line number Diff line number Diff line change
Expand Up @@ -2292,7 +2292,7 @@ <h3>Datenvisualisierung</h3>
</code></pre>
</section><section class="slide"><h2>Box Plot</h2>
<p>Visualisierung von statistischen Daten einer Verteilung (Minimum, Median, Maximum, ...)</p>
<pre><code class="hljs language-py">plt.boxplot(dice_simulation_1)
<pre><code class="hljs language-py">plt.boxplot(dice_simulation_1, whis=(<span class="hljs-number">0</span>, <span class="hljs-number">100</span>))
</code></pre>
<pre><code class="hljs language-py">plt.boxplot(
[dice_simulation_1, dice_simulation_2],
Expand Down Expand Up @@ -2354,7 +2354,8 @@ <h3>Datenvisualisierung</h3>
<pre><code class="hljs language-py">plt.boxplot(
[petal_length, petal_width, sepal_length, sepal_width],
labels=[<span class="hljs-string">"petal length"</span>, <span class="hljs-string">"petal width"</span>, <span class="hljs-string">"sepal length"</span>,
<span class="hljs-string">"sepal width"</span>]
<span class="hljs-string">"sepal width"</span>],
whis=(<span class="hljs-number">0</span>, <span class="hljs-number">100</span>)
)
</code></pre>
</section></section><section class="slides-section"><section class="slide"><h1>Figure, Axes &#x26; Subplots</h1>
Expand Down Expand Up @@ -2448,6 +2449,28 @@ <h3>Datenvisualisierung</h3>
<pre><code class="hljs language-py">colors = np.array([[[<span class="hljs-number">255</span>, <span class="hljs-number">0</span>, <span class="hljs-number">0</span>], [<span class="hljs-number">0</span>, <span class="hljs-number">255</span>, <span class="hljs-number">0</span>]],
[[<span class="hljs-number">0</span>, <span class="hljs-number">0</span>, <span class="hljs-number">255</span>], [<span class="hljs-number">0</span>, <span class="hljs-number">0</span>, <span class="hljs-number">0</span>]]])
plt.imshow(colors)
</code></pre>
</section></section><section class="slides-section"><section class="slide"><h1>Artists</h1>
</section><section class="slide"><h2>Artists</h2>
<p>Artist = Base Class für Elemente in einer <em>figure</em></p>
</section><section class="slide"><h2>Artists</h2>
<p>Beispiel: explizites Erstellen eines Artists (Rechteck)</p>
<pre><code class="hljs language-py">ax = plt.gca()

r = plt.Rectangle((<span class="hljs-number">0.25</span>, <span class="hljs-number">0.75</span>), <span class="hljs-number">0.1</span>, <span class="hljs-number">0.1</span>, color=<span class="hljs-string">"C0"</span>)

ax.add_artist(r)
</code></pre>
</section><section class="slide"><h2>Artists</h2>
<p>Beispiele: Erstellen einfacher Artists</p>
<pre><code class="hljs language-py">l = plt.Line2D((<span class="hljs-number">0.5</span>, <span class="hljs-number">0.5</span>), (<span class="hljs-number">0.25</span>, <span class="hljs-number">0.75</span>), color=<span class="hljs-string">"C0"</span>)
r = plt.Rectangle((<span class="hljs-number">0.25</span>, <span class="hljs-number">0.75</span>), <span class="hljs-number">0.1</span>, <span class="hljs-number">0.1</span>, color=<span class="hljs-string">"C1"</span>)
c = plt.Circle((<span class="hljs-number">0.75</span>, <span class="hljs-number">0.75</span>), <span class="hljs-number">0.1</span>, color=<span class="hljs-string">"C2"</span>)
p = plt.Polygon(
[[<span class="hljs-number">0.2</span>, <span class="hljs-number">0.2</span>], [<span class="hljs-number">0.5</span>, <span class="hljs-number">0.1</span>], [<span class="hljs-number">0.8</span>, <span class="hljs-number">0.2</span>]],
color=<span class="hljs-string">"C3"</span>
)
t = plt.Text(<span class="hljs-number">0</span>, <span class="hljs-number">0</span>, <span class="hljs-string">"Hello!"</span>, size=<span class="hljs-number">40</span>, color=<span class="hljs-string">"C4"</span>)
</code></pre></section></section></div>
</div>
<script>/*!
Expand Down
24 changes: 22 additions & 2 deletions docs/python-data-science-2-pyplot-en.html
Original file line number Diff line number Diff line change
Expand Up @@ -2292,7 +2292,7 @@ <h3>Data visualization</h3>
</code></pre>
</section><section class="slide"><h2>Box plot</h2>
<p>Visualization of statistical data of a distribution (minimum, median, maximum, ...)</p>
<pre><code class="hljs language-py">plt.boxplot(dice_simulation_1)
<pre><code class="hljs language-py">plt.boxplot(dice_simulation_1, whis=(<span class="hljs-number">0</span>, <span class="hljs-number">100</span>))
</code></pre>
<pre><code class="hljs language-py">plt.boxplot(
[dice_simulation_1, dice_simulation_2],
Expand Down Expand Up @@ -2354,7 +2354,8 @@ <h3>Data visualization</h3>
<pre><code class="hljs language-py">plt.boxplot(
[petal_length, petal_width, sepal_length, sepal_width],
labels=[<span class="hljs-string">"petal length"</span>, <span class="hljs-string">"petal width"</span>, <span class="hljs-string">"sepal length"</span>,
<span class="hljs-string">"sepal width"</span>]
<span class="hljs-string">"sepal width"</span>],
whis=(<span class="hljs-number">0</span>, <span class="hljs-number">100</span>)
)
</code></pre>
</section></section><section class="slides-section"><section class="slide"><h1>Pyplot: figure, axes &#x26; subplots</h1>
Expand Down Expand Up @@ -2448,6 +2449,25 @@ <h3>Data visualization</h3>
<pre><code class="hljs language-py">colors = np.array([[[<span class="hljs-number">255</span>, <span class="hljs-number">0</span>, <span class="hljs-number">0</span>], [<span class="hljs-number">0</span>, <span class="hljs-number">255</span>, <span class="hljs-number">0</span>]],
[[<span class="hljs-number">0</span>, <span class="hljs-number">0</span>, <span class="hljs-number">255</span>], [<span class="hljs-number">0</span>, <span class="hljs-number">0</span>, <span class="hljs-number">0</span>]]])
plt.imshow(colors)
</code></pre>
</section></section><section class="slides-section"><section class="slide"><h1>Artists</h1>
</section><section class="slide"><h2>Artists</h2>
<p>Artist = base class for elements in a figure</p>
</section><section class="slide"><h2>Artists</h2>
<p>example: creating an artist (rectangle) explicitly</p>
<pre><code class="hljs language-py">ax = plt.gca()

r = plt.Rectangle((<span class="hljs-number">0.25</span>, <span class="hljs-number">0.75</span>), <span class="hljs-number">0.1</span>, <span class="hljs-number">0.1</span>, color=<span class="hljs-string">"C0"</span>)

ax.add_artist(r)
</code></pre>
</section><section class="slide"><h2>Artists</h2>
<p>examples: creating primitive <em>artists</em>:</p>
<pre><code class="hljs language-py">l = plt.Line2D((<span class="hljs-number">0.5</span>, <span class="hljs-number">0.5</span>), (<span class="hljs-number">0.25</span>, <span class="hljs-number">0.75</span>), color=<span class="hljs-string">"C0"</span>)
r = plt.Rectangle((<span class="hljs-number">0.25</span>, <span class="hljs-number">0.75</span>), <span class="hljs-number">0.1</span>, <span class="hljs-number">0.1</span>, color=<span class="hljs-string">"C1"</span>)
c = plt.Circle((<span class="hljs-number">0.75</span>, <span class="hljs-number">0.75</span>), <span class="hljs-number">0.1</span>, color=<span class="hljs-string">"C2"</span>)
p = plt.Polygon([[<span class="hljs-number">0.2</span>, <span class="hljs-number">0.2</span>], [<span class="hljs-number">0.5</span>, <span class="hljs-number">0.1</span>], [<span class="hljs-number">0.8</span>, <span class="hljs-number">0.2</span>]], color=<span class="hljs-string">"C3"</span>)
t = plt.Text(<span class="hljs-number">0</span>, <span class="hljs-number">0</span>, <span class="hljs-string">"Hello!"</span>, size=<span class="hljs-number">40</span>, color=<span class="hljs-string">"C4"</span>)
</code></pre></section></section></div>
</div>
<script>/*!
Expand Down
Loading

0 comments on commit 7623a0a

Please sign in to comment.