<?xml version="1.0" encoding="UTF-8"?><rss version="2.0"
	xmlns:content="http://purl.org/rss/1.0/modules/content/"
	xmlns:wfw="http://wellformedweb.org/CommentAPI/"
	xmlns:dc="http://purl.org/dc/elements/1.1/"
	xmlns:atom="http://www.w3.org/2005/Atom"
	xmlns:sy="http://purl.org/rss/1.0/modules/syndication/"
	xmlns:slash="http://purl.org/rss/1.0/modules/slash/"
	>

<channel>
	<title>matplotlib Archives - Creatronix</title>
	<atom:link href="https://creatronix.de/tag/matplotlib/feed/" rel="self" type="application/rss+xml" />
	<link>https://creatronix.de/tag/matplotlib/</link>
	<description>My adventures in code &#38; business</description>
	<lastBuildDate>Mon, 27 Oct 2025 09:41:34 +0000</lastBuildDate>
	<language>en-US</language>
	<sy:updatePeriod>
	hourly	</sy:updatePeriod>
	<sy:updateFrequency>
	1	</sy:updateFrequency>
	<generator>https://wordpress.org/?v=6.9.4</generator>
	<item>
		<title>Introduction to matplotlib &#8211; Part 2</title>
		<link>https://creatronix.de/introduction-to-matplotlib-part-2/</link>
		
		<dc:creator><![CDATA[Jörn]]></dc:creator>
		<pubDate>Tue, 18 Dec 2018 09:12:40 +0000</pubDate>
				<category><![CDATA[Data Science & SQL]]></category>
		<category><![CDATA[linspace]]></category>
		<category><![CDATA[matplotlib]]></category>
		<category><![CDATA[numpy]]></category>
		<category><![CDATA[subplot]]></category>
		<guid isPermaLink="false">http://creatronix.de/?p=2182</guid>

					<description><![CDATA[<p>When you finished reading part 1 of the introduction you might have wondered how to draw more than one line or curve into on plot. I will show you now. To make it a bit more interesting we generate two functions: sine and cosine. We generate our x-values with numpy&#8217;s linspace function import numpy as&#8230;</p>
<p>The post <a href="https://creatronix.de/introduction-to-matplotlib-part-2/">Introduction to matplotlib &#8211; Part 2</a> appeared first on <a href="https://creatronix.de">Creatronix</a>.</p>
]]></description>
										<content:encoded><![CDATA[<p>When you finished reading <a href="https://creatronix.de/introduction-to-matplotlib/">part 1</a> of the introduction you might have wondered how to draw more than one line or curve into on plot. I will show you now.</p>
<p>To make it a bit more interesting we generate two functions: sine and cosine. We generate our x-values with numpy&#8217;s <a href="https://creatronix.de/numpy-linspace-function/">linspace function</a></p>
<div class="hcb_wrap">
<pre class="prism line-numbers lang-python" data-lang="Python"><code>import numpy as np 
import matplotlib.pyplot as plt 

x = np.linspace(0, 2*np.pi) 
sin = np.sin(x) 
cos = np.cos(x) 
plt.plot(x, sin, color='b') 
plt.plot(x, cos, color='r') 
plt.show()</code></pre>
</div>
<p>You can plot two or more curves by repeatedly calling the plot method.</p>
<p><img fetchpriority="high" decoding="async" class="alignnone size-full wp-image-2184" src="https://creatronix.de/wp-content/uploads/2018/10/pyplot_plot_21.png" alt="" width="640" height="480" srcset="https://creatronix.de/wp-content/uploads/2018/10/pyplot_plot_21.png 640w, https://creatronix.de/wp-content/uploads/2018/10/pyplot_plot_21-300x225.png 300w" sizes="(max-width: 640px) 100vw, 640px" /></p>
<p>That&#8217;s fine as long as the individual plots share the same axis-description and values.</p>
<h2>Subplots</h2>
<div class="hcb_wrap">
<pre class="prism line-numbers lang-python" data-lang="Python"><code>fig = plt.figure() 
p1 = fig.add_subplot(2, 1, 1) 
p2 = fig.add_subplot(2, 1, 2) 
p1.plot(x, sin, c='b') 
p2.plot(x, cos, c='r'</code></pre>
</div>
<p>The add_subplot method allows us to put many plots into one &#8220;parent&#8221; plot aka figure. The arguments are (number_of_rows, number_of_columns, place in the matrix) So in this example we have 2 rows in 1 column, sine is in first, cosine in second position:</p>
<p><img decoding="async" class="alignnone size-full wp-image-2186" src="https://creatronix.de/wp-content/uploads/2018/10/pyplot_plot_22.png" alt="" width="640" height="480" srcset="https://creatronix.de/wp-content/uploads/2018/10/pyplot_plot_22.png 640w, https://creatronix.de/wp-content/uploads/2018/10/pyplot_plot_22-300x225.png 300w" sizes="(max-width: 640px) 100vw, 640px" /></p>
<p>when you have a 2 by 2 matrix it is counted from columns to row</p>
<div class="hcb_wrap">
<pre class="prism line-numbers lang-python" data-lang="Python"><code>fig = plt.figure() 
p1 = fig.add_subplot(221) 
p2 = fig.add_subplot(222) 
p3 = fig.add_subplot(223) 
p4 = fig.add_subplot(224) 
p1.plot(x, sin, c='b') 
p2.plot(x, cos, c='r') 
p3.plot(x, -sin, c='g') 
p4.plot(x, -cos, c='y')</code></pre>
</div>
<p><img decoding="async" class="alignnone size-full wp-image-2199" src="https://creatronix.de/wp-content/uploads/2018/10/pyplot_plot_23.png" alt="" width="640" height="480" srcset="https://creatronix.de/wp-content/uploads/2018/10/pyplot_plot_23.png 640w, https://creatronix.de/wp-content/uploads/2018/10/pyplot_plot_23-300x225.png 300w" sizes="(max-width: 640px) 100vw, 640px" /></p>
<p>The code is available as a <a href="https://github.com/jboegeholz/introduction_to_matplotlib/blob/master/02_subplots.ipynb">Jupyter Notebook on my github </a></p>
<p>More about matplotlib in <a href="https://creatronix.de/introduction-to-matplotlib-part-3/">Part 3</a></p>
<p>The post <a href="https://creatronix.de/introduction-to-matplotlib-part-2/">Introduction to matplotlib &#8211; Part 2</a> appeared first on <a href="https://creatronix.de">Creatronix</a>.</p>
]]></content:encoded>
					
		
		
			</item>
		<item>
		<title>10 things I didn&#8217;t know about Data Science a year ago</title>
		<link>https://creatronix.de/10-things-i-didnt-know-about-data-science-a-year-ago/</link>
		
		<dc:creator><![CDATA[Jörn]]></dc:creator>
		<pubDate>Mon, 12 Nov 2018 08:42:26 +0000</pubDate>
				<category><![CDATA[Data Science & SQL]]></category>
		<category><![CDATA[Python]]></category>
		<category><![CDATA[ai]]></category>
		<category><![CDATA[Bayes theorem]]></category>
		<category><![CDATA[data science]]></category>
		<category><![CDATA[machine learning]]></category>
		<category><![CDATA[matplotlib]]></category>
		<category><![CDATA[naive bayes]]></category>
		<category><![CDATA[numpy]]></category>
		<category><![CDATA[opencv]]></category>
		<guid isPermaLink="false">http://creatronix.de/?p=2269</guid>

					<description><![CDATA[<p>In my article My personal road map for learning data science in 2018 I wrote about how I try to tackle the data science knowledge sphere. Due to the fact that 2018 is slowly coming to an end I think it is time for a little wrap up. What are the things I learned about&#8230;</p>
<p>The post <a href="https://creatronix.de/10-things-i-didnt-know-about-data-science-a-year-ago/">10 things I didn&#8217;t know about Data Science a year ago</a> appeared first on <a href="https://creatronix.de">Creatronix</a>.</p>
]]></description>
										<content:encoded><![CDATA[<p>In my article <a href="https://creatronix.de/my-personal-road-map-for-learning-data-science/">My personal road map for learning data science in 2018</a> I wrote about how I try to tackle the data science knowledge sphere. Due to the fact that 2018 is slowly coming to an end I think it is time for a little wrap up.</p>
<p>What are the things I learned about Data Science in 2018? Here we go:</p>
<h2>The difference between Data Science, Machine Learning, Deep Learning and AI</h2>
<p><img decoding="async" class="alignnone size-full wp-image-2276" src="https://creatronix.de/wp-content/uploads/2018/10/data_science_vs_ml.png" alt="" width="514" height="392" srcset="https://creatronix.de/wp-content/uploads/2018/10/data_science_vs_ml.png 514w, https://creatronix.de/wp-content/uploads/2018/10/data_science_vs_ml-300x229.png 300w" sizes="(max-width: 514px) 100vw, 514px" /></p>
<p>A picture says more than a thousand words.</p>
<h2>The difference between supervised and unsupervised learning</h2>
<p><em>Supervised Learning</em></p>
<p>You have training and test data with <strong>labels</strong>. Labels tell You to which e.g. class a certain data item belongs. Image you have images of pets and the labels are the name of the pets.</p>
<p><em>Unsupervised Learning</em></p>
<p>Your data doesn’t have labels. Your algorithm e.g. k-means clustering need to figure out a structure given only the data</p>
<h2>The areas of applied machine learning</h2>
<p>are described here: <a href="https://creatronix.de/the-essence-of-machine-learning/">The Essence of Machine Learning </a>and <a href="https://creatronix.de/data-science-overview/">Data Science Overview</a></p>
<h2>Bayes Theorem</h2>
<p>In my article <a href="https://creatronix.de/bayes-theorem/">Bayes theorem</a> I elaborated about the <strong>base rate fallacy </strong>and in <a href="https://creatronix.de/lesson-2-naive-bayes/">naive bayes</a> I recapped the second lesson from udacity&#8217;s <a href="https://creatronix.de/ud120-intro-to-machine-learning/">UD120 Intro to Machine Learning</a></p>
<h2>Precision and Recall and ROC</h2>
<p>In my article <a href="https://creatronix.de/classification-precision-and-recall/">classification: precision and recall</a> I wrote about different useful measures to evaluate the quality of a supervised learning algorithm.</p>
<p>In <a href="https://creatronix.de/receiver-operating-characteristic/">Receiver Operating Characteristic</a> I wrote about another useful measures the ROC.</p>
<h2>Visualization with matplotlib</h2>
<p>Matplotlib is a really good starting point for visualization. I wrote about it in <a href="https://creatronix.de/introduction-to-matplotlib/">Introduction to matplotlib</a>, <a href="https://creatronix.de/introduction-to-matplotlib-part-2/">Matplotlib &#8211; Part 2</a>, <a href="https://creatronix.de/scatterplot-with-matplotlib/">Scatterplot with matplotlib</a></p>
<h2>Math with numpy</h2>
<p>I wrote some articles about the usage of numpy but only scraped the surface of this mighty library</p>
<ul>
<li><a href="https://creatronix.de/linear-algebra-with-numpy-part-1/">Linear Algebra with numpy &#8211; Part 1</a></li>
<li><a href="https://creatronix.de/numpy-random-choice/">numpy random choice</a></li>
<li><a href="https://creatronix.de/numpy-linspace-function/">Numpy linspace function</a></li>
</ul>
<h2>Image manipulation with OpenCV</h2>
<p><a href="https://creatronix.de/intro-to-opencv-with-python/">Intro to OpenCV with Python</a></p>
<h2>JuPyter Notebooks</h2>
<p>Sometimes I love them sometimes I hate them. I wrote an <a href="https://creatronix.de/introduction-to-jupyter-notebook/">Introduction to JuPyter Notebook</a></p>
<h2>Podcasts</h2>
<p>In 2018 I&#8217;ve listened to a bunch of great podcasts on iTunes:</p>
<ul>
<li><a href="https://lineardigressions.com/">Linear digressions</a></li>
<li><a href="https://lexfridman.com/ai/">MIT Lex Fridman</a></li>
<li><a href="https://itunes.apple.com/de/podcast/self-driving-cars-dr-lance-eliot-podcast-series/id1330558096?mt=2">Dr. Lance Eliot</a></li>
</ul>
<p>&nbsp;</p>
<p>The post <a href="https://creatronix.de/10-things-i-didnt-know-about-data-science-a-year-ago/">10 things I didn&#8217;t know about Data Science a year ago</a> appeared first on <a href="https://creatronix.de">Creatronix</a>.</p>
]]></content:encoded>
					
		
		
			</item>
	</channel>
</rss>
