<?xml version="1.0"?>
<feed xmlns="http://www.w3.org/2005/Atom" xml:lang="en">
	<id>https://www.phidgets.com/docs21/index.php?action=history&amp;feed=atom&amp;title=Live_Data_Graphing</id>
	<title>Live Data Graphing - Revision history</title>
	<link rel="self" type="application/atom+xml" href="https://www.phidgets.com/docs21/index.php?action=history&amp;feed=atom&amp;title=Live_Data_Graphing"/>
	<link rel="alternate" type="text/html" href="https://www.phidgets.com/docs21/index.php?title=Live_Data_Graphing&amp;action=history"/>
	<updated>2026-04-05T12:35:44Z</updated>
	<subtitle>Revision history for this page on the wiki</subtitle>
	<generator>MediaWiki 1.39.8</generator>
	<entry>
		<id>https://www.phidgets.com/docs21/index.php?title=Live_Data_Graphing&amp;diff=23938&amp;oldid=prev</id>
		<title>Mparadis at 19:00, 7 June 2017</title>
		<link rel="alternate" type="text/html" href="https://www.phidgets.com/docs21/index.php?title=Live_Data_Graphing&amp;diff=23938&amp;oldid=prev"/>
		<updated>2017-06-07T19:00:08Z</updated>

		<summary type="html">&lt;p&gt;&lt;/p&gt;
&lt;table style=&quot;background-color: #fff; color: #202122;&quot; data-mw=&quot;interface&quot;&gt;
				&lt;col class=&quot;diff-marker&quot; /&gt;
				&lt;col class=&quot;diff-content&quot; /&gt;
				&lt;col class=&quot;diff-marker&quot; /&gt;
				&lt;col class=&quot;diff-content&quot; /&gt;
				&lt;tr class=&quot;diff-title&quot; lang=&quot;en&quot;&gt;
				&lt;td colspan=&quot;2&quot; style=&quot;background-color: #fff; color: #202122; text-align: center;&quot;&gt;← Older revision&lt;/td&gt;
				&lt;td colspan=&quot;2&quot; style=&quot;background-color: #fff; color: #202122; text-align: center;&quot;&gt;Revision as of 19:00, 7 June 2017&lt;/td&gt;
				&lt;/tr&gt;&lt;tr&gt;&lt;td colspan=&quot;2&quot; class=&quot;diff-lineno&quot; id=&quot;mw-diff-left-l277&quot;&gt;Line 277:&lt;/td&gt;
&lt;td colspan=&quot;2&quot; class=&quot;diff-lineno&quot;&gt;Line 277:&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class=&quot;diff-marker&quot;&gt;&lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;Ready to run the code itself?  Here it is:&lt;/div&gt;&lt;/td&gt;&lt;td class=&quot;diff-marker&quot;&gt;&lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;Ready to run the code itself?  Here it is:&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class=&quot;diff-marker&quot;&gt;&lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;br/&gt;&lt;/td&gt;&lt;td class=&quot;diff-marker&quot;&gt;&lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;br/&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class=&quot;diff-marker&quot; data-marker=&quot;−&quot;&gt;&lt;/td&gt;&lt;td style=&quot;color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #ffe49c; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;[{{SERVER}}/&lt;del style=&quot;font-weight: bold; text-decoration: none;&quot;&gt;wiki&lt;/del&gt;/images/6/64/Temp_visual_logger.py Temp_visual_logger.py]&lt;/div&gt;&lt;/td&gt;&lt;td class=&quot;diff-marker&quot; data-marker=&quot;+&quot;&gt;&lt;/td&gt;&lt;td style=&quot;color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #a3d3ff; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;[{{SERVER}}/&lt;ins style=&quot;font-weight: bold; text-decoration: none;&quot;&gt;docs21&lt;/ins&gt;/images/6/64/Temp_visual_logger.py Temp_visual_logger.py]&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class=&quot;diff-marker&quot;&gt;&lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;br/&gt;&lt;/td&gt;&lt;td class=&quot;diff-marker&quot;&gt;&lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;br/&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class=&quot;diff-marker&quot;&gt;&lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;You can run the code as described by operating system on the [[Language - Python]] page.&lt;/div&gt;&lt;/td&gt;&lt;td class=&quot;diff-marker&quot;&gt;&lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;You can run the code as described by operating system on the [[Language - Python]] page.&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;/table&gt;</summary>
		<author><name>Mparadis</name></author>
	</entry>
	<entry>
		<id>https://www.phidgets.com/docs21/index.php?title=Live_Data_Graphing&amp;diff=23227&amp;oldid=prev</id>
		<title>Mparadis: /* Putting it All Together */</title>
		<link rel="alternate" type="text/html" href="https://www.phidgets.com/docs21/index.php?title=Live_Data_Graphing&amp;diff=23227&amp;oldid=prev"/>
		<updated>2013-06-24T20:51:36Z</updated>

		<summary type="html">&lt;p&gt;&lt;span dir=&quot;auto&quot;&gt;&lt;span class=&quot;autocomment&quot;&gt;Putting it All Together&lt;/span&gt;&lt;/span&gt;&lt;/p&gt;
&lt;table style=&quot;background-color: #fff; color: #202122;&quot; data-mw=&quot;interface&quot;&gt;
				&lt;col class=&quot;diff-marker&quot; /&gt;
				&lt;col class=&quot;diff-content&quot; /&gt;
				&lt;col class=&quot;diff-marker&quot; /&gt;
				&lt;col class=&quot;diff-content&quot; /&gt;
				&lt;tr class=&quot;diff-title&quot; lang=&quot;en&quot;&gt;
				&lt;td colspan=&quot;2&quot; style=&quot;background-color: #fff; color: #202122; text-align: center;&quot;&gt;← Older revision&lt;/td&gt;
				&lt;td colspan=&quot;2&quot; style=&quot;background-color: #fff; color: #202122; text-align: center;&quot;&gt;Revision as of 20:51, 24 June 2013&lt;/td&gt;
				&lt;/tr&gt;&lt;tr&gt;&lt;td colspan=&quot;2&quot; class=&quot;diff-lineno&quot; id=&quot;mw-diff-left-l277&quot;&gt;Line 277:&lt;/td&gt;
&lt;td colspan=&quot;2&quot; class=&quot;diff-lineno&quot;&gt;Line 277:&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class=&quot;diff-marker&quot;&gt;&lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;Ready to run the code itself?  Here it is:&lt;/div&gt;&lt;/td&gt;&lt;td class=&quot;diff-marker&quot;&gt;&lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;Ready to run the code itself?  Here it is:&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class=&quot;diff-marker&quot;&gt;&lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;br/&gt;&lt;/td&gt;&lt;td class=&quot;diff-marker&quot;&gt;&lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;br/&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class=&quot;diff-marker&quot; data-marker=&quot;−&quot;&gt;&lt;/td&gt;&lt;td style=&quot;color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #ffe49c; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;[&lt;del style=&quot;font-weight: bold; text-decoration: none;&quot;&gt;[File:&lt;/del&gt;Temp_visual_logger.py&lt;del style=&quot;font-weight: bold; text-decoration: none;&quot;&gt;]&lt;/del&gt;]&lt;/div&gt;&lt;/td&gt;&lt;td class=&quot;diff-marker&quot; data-marker=&quot;+&quot;&gt;&lt;/td&gt;&lt;td style=&quot;color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #a3d3ff; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;[&lt;ins style=&quot;font-weight: bold; text-decoration: none;&quot;&gt;{{SERVER}}/wiki/images/6/64/Temp_visual_logger.py &lt;/ins&gt;Temp_visual_logger.py]&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class=&quot;diff-marker&quot;&gt;&lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;br/&gt;&lt;/td&gt;&lt;td class=&quot;diff-marker&quot;&gt;&lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;br/&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class=&quot;diff-marker&quot;&gt;&lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;You can run the code as described by operating system on the [[Language - Python]] page.&lt;/div&gt;&lt;/td&gt;&lt;td class=&quot;diff-marker&quot;&gt;&lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;You can run the code as described by operating system on the [[Language - Python]] page.&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;/table&gt;</summary>
		<author><name>Mparadis</name></author>
	</entry>
	<entry>
		<id>https://www.phidgets.com/docs21/index.php?title=Live_Data_Graphing&amp;diff=21838&amp;oldid=prev</id>
		<title>Burley at 17:54, 8 August 2012</title>
		<link rel="alternate" type="text/html" href="https://www.phidgets.com/docs21/index.php?title=Live_Data_Graphing&amp;diff=21838&amp;oldid=prev"/>
		<updated>2012-08-08T17:54:12Z</updated>

		<summary type="html">&lt;p&gt;&lt;/p&gt;
&lt;table style=&quot;background-color: #fff; color: #202122;&quot; data-mw=&quot;interface&quot;&gt;
				&lt;col class=&quot;diff-marker&quot; /&gt;
				&lt;col class=&quot;diff-content&quot; /&gt;
				&lt;col class=&quot;diff-marker&quot; /&gt;
				&lt;col class=&quot;diff-content&quot; /&gt;
				&lt;tr class=&quot;diff-title&quot; lang=&quot;en&quot;&gt;
				&lt;td colspan=&quot;2&quot; style=&quot;background-color: #fff; color: #202122; text-align: center;&quot;&gt;← Older revision&lt;/td&gt;
				&lt;td colspan=&quot;2&quot; style=&quot;background-color: #fff; color: #202122; text-align: center;&quot;&gt;Revision as of 17:54, 8 August 2012&lt;/td&gt;
				&lt;/tr&gt;&lt;tr&gt;&lt;td colspan=&quot;2&quot; class=&quot;diff-lineno&quot; id=&quot;mw-diff-left-l96&quot;&gt;Line 96:&lt;/td&gt;
&lt;td colspan=&quot;2&quot; class=&quot;diff-lineno&quot;&gt;Line 96:&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class=&quot;diff-marker&quot;&gt;&lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;===Libraries Needed===&lt;/div&gt;&lt;/td&gt;&lt;td class=&quot;diff-marker&quot;&gt;&lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;===Libraries Needed===&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class=&quot;diff-marker&quot;&gt;&lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;br/&gt;&lt;/td&gt;&lt;td class=&quot;diff-marker&quot;&gt;&lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;br/&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class=&quot;diff-marker&quot; data-marker=&quot;−&quot;&gt;&lt;/td&gt;&lt;td style=&quot;color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #ffe49c; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;First, make sure you have followed the Getting Started guide for your Temperature Sensor, found its &lt;del style=&quot;font-weight: bold; text-decoration: none;&quot;&gt;product page on our &lt;/del&gt;[&lt;del style=&quot;font-weight: bold; text-decoration: none;&quot;&gt;{{SERVER}} main website&lt;/del&gt;].&lt;/div&gt;&lt;/td&gt;&lt;td class=&quot;diff-marker&quot; data-marker=&quot;+&quot;&gt;&lt;/td&gt;&lt;td style=&quot;color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #a3d3ff; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;First, make sure you have followed the Getting Started guide for your Temperature Sensor, found &lt;ins style=&quot;font-weight: bold; text-decoration: none;&quot;&gt;in &lt;/ins&gt;its [&lt;ins style=&quot;font-weight: bold; text-decoration: none;&quot;&gt;[:Category:UserGuide|user guide]&lt;/ins&gt;].&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class=&quot;diff-marker&quot;&gt;&lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;br/&gt;&lt;/td&gt;&lt;td class=&quot;diff-marker&quot;&gt;&lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;br/&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class=&quot;diff-marker&quot;&gt;&lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;To run the code in this guide, you will need the following installed:&lt;/div&gt;&lt;/td&gt;&lt;td class=&quot;diff-marker&quot;&gt;&lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;To run the code in this guide, you will need the following installed:&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;/table&gt;</summary>
		<author><name>Burley</name></author>
	</entry>
	<entry>
		<id>https://www.phidgets.com/docs21/index.php?title=Live_Data_Graphing&amp;diff=20639&amp;oldid=prev</id>
		<title>Cora at 14:10, 29 June 2012</title>
		<link rel="alternate" type="text/html" href="https://www.phidgets.com/docs21/index.php?title=Live_Data_Graphing&amp;diff=20639&amp;oldid=prev"/>
		<updated>2012-06-29T14:10:46Z</updated>

		<summary type="html">&lt;p&gt;&lt;/p&gt;
&lt;table style=&quot;background-color: #fff; color: #202122;&quot; data-mw=&quot;interface&quot;&gt;
				&lt;col class=&quot;diff-marker&quot; /&gt;
				&lt;col class=&quot;diff-content&quot; /&gt;
				&lt;col class=&quot;diff-marker&quot; /&gt;
				&lt;col class=&quot;diff-content&quot; /&gt;
				&lt;tr class=&quot;diff-title&quot; lang=&quot;en&quot;&gt;
				&lt;td colspan=&quot;2&quot; style=&quot;background-color: #fff; color: #202122; text-align: center;&quot;&gt;← Older revision&lt;/td&gt;
				&lt;td colspan=&quot;2&quot; style=&quot;background-color: #fff; color: #202122; text-align: center;&quot;&gt;Revision as of 14:10, 29 June 2012&lt;/td&gt;
				&lt;/tr&gt;&lt;tr&gt;&lt;td colspan=&quot;2&quot; class=&quot;diff-lineno&quot; id=&quot;mw-diff-left-l28&quot;&gt;Line 28:&lt;/td&gt;
&lt;td colspan=&quot;2&quot; class=&quot;diff-lineno&quot;&gt;Line 28:&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class=&quot;diff-marker&quot;&gt;&lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;|}&lt;/div&gt;&lt;/td&gt;&lt;td class=&quot;diff-marker&quot;&gt;&lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;|}&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class=&quot;diff-marker&quot;&gt;&lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;br/&gt;&lt;/td&gt;&lt;td class=&quot;diff-marker&quot;&gt;&lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;br/&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class=&quot;diff-marker&quot; data-marker=&quot;−&quot;&gt;&lt;/td&gt;&lt;td style=&quot;color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #ffe49c; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;As with any of our [[Application Guides|described projects]], Phidgets takes care of the electrical component design.  Here, we show how to collect the data and display it in a slick manner.   &lt;/div&gt;&lt;/td&gt;&lt;td class=&quot;diff-marker&quot; data-marker=&quot;+&quot;&gt;&lt;/td&gt;&lt;td style=&quot;color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #a3d3ff; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;As with any of our [[&lt;ins style=&quot;font-weight: bold; text-decoration: none;&quot;&gt;:Category:&lt;/ins&gt;Application Guides|described projects]], Phidgets takes care of the electrical component design.  Here, we show how to collect the data and display it in a slick manner.   &lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class=&quot;diff-marker&quot;&gt;&lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;br/&gt;&lt;/td&gt;&lt;td class=&quot;diff-marker&quot;&gt;&lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;br/&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class=&quot;diff-marker&quot;&gt;&lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;If you just want to log data and save it to a file, you probably want to start with our [[Data Logging With a Thermocouple]] application guide, which does exactly that.  This application guide focuses on the graphical display of data over time.&lt;/div&gt;&lt;/td&gt;&lt;td class=&quot;diff-marker&quot;&gt;&lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;If you just want to log data and save it to a file, you probably want to start with our [[Data Logging With a Thermocouple]] application guide, which does exactly that.  This application guide focuses on the graphical display of data over time.&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td colspan=&quot;2&quot; class=&quot;diff-lineno&quot; id=&quot;mw-diff-left-l38&quot;&gt;Line 38:&lt;/td&gt;
&lt;td colspan=&quot;2&quot; class=&quot;diff-lineno&quot;&gt;Line 38:&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class=&quot;diff-marker&quot;&gt;&lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;This project is a live GUI graphing application that displays data in real time, in a scrolling graph.  This type of application - written in Python - can capture low-speed data and display it, and hence is a good alternative to MATLAB graphics when you wish to use events in your code.  Python also offers fast numerical processing via the NumPy library and so can be a numerical alternative to MATLAB as well.&lt;/div&gt;&lt;/td&gt;&lt;td class=&quot;diff-marker&quot;&gt;&lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;This project is a live GUI graphing application that displays data in real time, in a scrolling graph.  This type of application - written in Python - can capture low-speed data and display it, and hence is a good alternative to MATLAB graphics when you wish to use events in your code.  Python also offers fast numerical processing via the NumPy library and so can be a numerical alternative to MATLAB as well.&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class=&quot;diff-marker&quot;&gt;&lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;br/&gt;&lt;/td&gt;&lt;td class=&quot;diff-marker&quot;&gt;&lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;br/&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class=&quot;diff-marker&quot; data-marker=&quot;−&quot;&gt;&lt;/td&gt;&lt;td style=&quot;color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #ffe49c; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;Although we use a Phidget thermocouple board (such as the [&lt;del style=&quot;font-weight: bold; text-decoration: none;&quot;&gt;http://www.phidgets.com&lt;/del&gt;/products.php?product_id=1051 Phidget 1051 1-Thermocouple Board] or the [&lt;del style=&quot;font-weight: bold; text-decoration: none;&quot;&gt;http://www.phidgets.com&lt;/del&gt;/products.php?product_id=1048 Phidget 1048 4-Thermocouple Board]), this code can be adapted for nearly any Phidget, as shown by the use of it for a Phidget DC Motor Controller in the [[#Extending with Other Phidgets and Widgets|Extra Credit section]].&lt;/div&gt;&lt;/td&gt;&lt;td class=&quot;diff-marker&quot; data-marker=&quot;+&quot;&gt;&lt;/td&gt;&lt;td style=&quot;color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #a3d3ff; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;Although we use a Phidget thermocouple board (such as the [&lt;ins style=&quot;font-weight: bold; text-decoration: none;&quot;&gt;{{SERVER}}&lt;/ins&gt;/products.php?product_id=1051 Phidget 1051 1-Thermocouple Board] or the [&lt;ins style=&quot;font-weight: bold; text-decoration: none;&quot;&gt;{{SERVER}}&lt;/ins&gt;/products.php?product_id=1048 Phidget 1048 4-Thermocouple Board]), this code can be adapted for nearly any Phidget, as shown by the use of it for a Phidget DC Motor Controller in the [[#Extending with Other Phidgets and Widgets|Extra Credit section]].&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class=&quot;diff-marker&quot;&gt;&lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;br/&gt;&lt;/td&gt;&lt;td class=&quot;diff-marker&quot;&gt;&lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;br/&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class=&quot;diff-marker&quot;&gt;&lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;The GUI program has automatic axes scaling and scrolling as this smaller-than-reality (and low resolution) animated GIF shows:&lt;/div&gt;&lt;/td&gt;&lt;td class=&quot;diff-marker&quot;&gt;&lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;The GUI program has automatic axes scaling and scrolling as this smaller-than-reality (and low resolution) animated GIF shows:&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td colspan=&quot;2&quot; class=&quot;diff-lineno&quot; id=&quot;mw-diff-left-l55&quot;&gt;Line 55:&lt;/td&gt;
&lt;td colspan=&quot;2&quot; class=&quot;diff-lineno&quot;&gt;Line 55:&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class=&quot;diff-marker&quot;&gt;&lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;|- style=&amp;quot;background: #efefef;&amp;quot;&lt;/div&gt;&lt;/td&gt;&lt;td class=&quot;diff-marker&quot;&gt;&lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;|- style=&amp;quot;background: #efefef;&amp;quot;&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class=&quot;diff-marker&quot;&gt;&lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;|&lt;/div&gt;&lt;/td&gt;&lt;td class=&quot;diff-marker&quot;&gt;&lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;|&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class=&quot;diff-marker&quot; data-marker=&quot;−&quot;&gt;&lt;/td&gt;&lt;td style=&quot;color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #ffe49c; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;*[&lt;del style=&quot;font-weight: bold; text-decoration: none;&quot;&gt;http://www.phidgets.com&lt;/del&gt;/products.php?product_id=1051 1051 - PhidgetTemperatureSensor 1-Input], plus&lt;/div&gt;&lt;/td&gt;&lt;td class=&quot;diff-marker&quot; data-marker=&quot;+&quot;&gt;&lt;/td&gt;&lt;td style=&quot;color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #a3d3ff; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;*[&lt;ins style=&quot;font-weight: bold; text-decoration: none;&quot;&gt;{{SERVER}}&lt;/ins&gt;/products.php?product_id=1051 1051 - PhidgetTemperatureSensor 1-Input], plus&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class=&quot;diff-marker&quot; data-marker=&quot;−&quot;&gt;&lt;/td&gt;&lt;td style=&quot;color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #ffe49c; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;*[&lt;del style=&quot;font-weight: bold; text-decoration: none;&quot;&gt;http://www.phidgets.com&lt;/del&gt;/products.php?product_id=3107 3107 - TPK-01 Bead Probe K-Type Thermocouple (-50°C to +200°C)]&lt;/div&gt;&lt;/td&gt;&lt;td class=&quot;diff-marker&quot; data-marker=&quot;+&quot;&gt;&lt;/td&gt;&lt;td style=&quot;color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #a3d3ff; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;*[&lt;ins style=&quot;font-weight: bold; text-decoration: none;&quot;&gt;{{SERVER}}&lt;/ins&gt;/products.php?product_id=3107 3107 - TPK-01 Bead Probe K-Type Thermocouple (-50°C to +200°C)]&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class=&quot;diff-marker&quot;&gt;&lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;| Basic thermocouple setup&lt;/div&gt;&lt;/td&gt;&lt;td class=&quot;diff-marker&quot;&gt;&lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;| Basic thermocouple setup&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class=&quot;diff-marker&quot;&gt;&lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;|- style=&amp;quot;background: #efefef;&amp;quot;&lt;/div&gt;&lt;/td&gt;&lt;td class=&quot;diff-marker&quot;&gt;&lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;|- style=&amp;quot;background: #efefef;&amp;quot;&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class=&quot;diff-marker&quot;&gt;&lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;|&lt;/div&gt;&lt;/td&gt;&lt;td class=&quot;diff-marker&quot;&gt;&lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;|&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class=&quot;diff-marker&quot; data-marker=&quot;−&quot;&gt;&lt;/td&gt;&lt;td style=&quot;color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #ffe49c; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;*[&lt;del style=&quot;font-weight: bold; text-decoration: none;&quot;&gt;http://www.phidgets.com&lt;/del&gt;/products.php?product_id=1048 1048 - PhidgetTemperatureSensor 4-Input], plus&lt;/div&gt;&lt;/td&gt;&lt;td class=&quot;diff-marker&quot; data-marker=&quot;+&quot;&gt;&lt;/td&gt;&lt;td style=&quot;color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #a3d3ff; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;*[&lt;ins style=&quot;font-weight: bold; text-decoration: none;&quot;&gt;{{SERVER}}&lt;/ins&gt;/products.php?product_id=1048 1048 - PhidgetTemperatureSensor 4-Input], plus&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class=&quot;diff-marker&quot; data-marker=&quot;−&quot;&gt;&lt;/td&gt;&lt;td style=&quot;color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #ffe49c; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;*[&lt;del style=&quot;font-weight: bold; text-decoration: none;&quot;&gt;http://www.phidgets.com&lt;/del&gt;/products.php?product_id=3107 3107 - TPK-01 Bead Probe K-Type Thermocouple (-50°C to +200°C)]&lt;/div&gt;&lt;/td&gt;&lt;td class=&quot;diff-marker&quot; data-marker=&quot;+&quot;&gt;&lt;/td&gt;&lt;td style=&quot;color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #a3d3ff; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;*[&lt;ins style=&quot;font-weight: bold; text-decoration: none;&quot;&gt;{{SERVER}}&lt;/ins&gt;/products.php?product_id=3107 3107 - TPK-01 Bead Probe K-Type Thermocouple (-50°C to +200°C)]&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class=&quot;diff-marker&quot;&gt;&lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;| Ability to measure multiple points&lt;/div&gt;&lt;/td&gt;&lt;td class=&quot;diff-marker&quot;&gt;&lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;| Ability to measure multiple points&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class=&quot;diff-marker&quot;&gt;&lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;|- style=&amp;quot;background: #efefef;&amp;quot;&lt;/div&gt;&lt;/td&gt;&lt;td class=&quot;diff-marker&quot;&gt;&lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;|- style=&amp;quot;background: #efefef;&amp;quot;&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class=&quot;diff-marker&quot;&gt;&lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;|&lt;/div&gt;&lt;/td&gt;&lt;td class=&quot;diff-marker&quot;&gt;&lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;|&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class=&quot;diff-marker&quot; data-marker=&quot;−&quot;&gt;&lt;/td&gt;&lt;td style=&quot;color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #ffe49c; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;*[&lt;del style=&quot;font-weight: bold; text-decoration: none;&quot;&gt;http://www.phidgets.com&lt;/del&gt;/products.php?product_id=1051 1051 - PhidgetTemperatureSensor 1-Input], plus&lt;/div&gt;&lt;/td&gt;&lt;td class=&quot;diff-marker&quot; data-marker=&quot;+&quot;&gt;&lt;/td&gt;&lt;td style=&quot;color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #a3d3ff; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;*[&lt;ins style=&quot;font-weight: bold; text-decoration: none;&quot;&gt;{{SERVER}}&lt;/ins&gt;/products.php?product_id=1051 1051 - PhidgetTemperatureSensor 1-Input], plus&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class=&quot;diff-marker&quot; data-marker=&quot;−&quot;&gt;&lt;/td&gt;&lt;td style=&quot;color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #ffe49c; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;*[&lt;del style=&quot;font-weight: bold; text-decoration: none;&quot;&gt;http://www.phidgets.com&lt;/del&gt;/products.php?product_id=3110 3110 - TPK-01H Bead Probe K-Type Thermocouple (-50°C to +785°C)]&lt;/div&gt;&lt;/td&gt;&lt;td class=&quot;diff-marker&quot; data-marker=&quot;+&quot;&gt;&lt;/td&gt;&lt;td style=&quot;color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #a3d3ff; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;*[&lt;ins style=&quot;font-weight: bold; text-decoration: none;&quot;&gt;{{SERVER}}&lt;/ins&gt;/products.php?product_id=3110 3110 - TPK-01H Bead Probe K-Type Thermocouple (-50°C to +785°C)]&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class=&quot;diff-marker&quot;&gt;&lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;| Wide temperature range thermocouple&lt;/div&gt;&lt;/td&gt;&lt;td class=&quot;diff-marker&quot;&gt;&lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;| Wide temperature range thermocouple&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class=&quot;diff-marker&quot;&gt;&lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;|}&lt;/div&gt;&lt;/td&gt;&lt;td class=&quot;diff-marker&quot;&gt;&lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;|}&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td colspan=&quot;2&quot; class=&quot;diff-lineno&quot; id=&quot;mw-diff-left-l96&quot;&gt;Line 96:&lt;/td&gt;
&lt;td colspan=&quot;2&quot; class=&quot;diff-lineno&quot;&gt;Line 96:&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class=&quot;diff-marker&quot;&gt;&lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;===Libraries Needed===&lt;/div&gt;&lt;/td&gt;&lt;td class=&quot;diff-marker&quot;&gt;&lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;===Libraries Needed===&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class=&quot;diff-marker&quot;&gt;&lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;br/&gt;&lt;/td&gt;&lt;td class=&quot;diff-marker&quot;&gt;&lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;br/&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class=&quot;diff-marker&quot; data-marker=&quot;−&quot;&gt;&lt;/td&gt;&lt;td style=&quot;color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #ffe49c; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;First, make sure you have followed the Getting Started guide for your Temperature Sensor, found its product page on our [&lt;del style=&quot;font-weight: bold; text-decoration: none;&quot;&gt;http://www.phidgets.com &lt;/del&gt;main website].&lt;/div&gt;&lt;/td&gt;&lt;td class=&quot;diff-marker&quot; data-marker=&quot;+&quot;&gt;&lt;/td&gt;&lt;td style=&quot;color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #a3d3ff; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;First, make sure you have followed the Getting Started guide for your Temperature Sensor, found its product page on our [&lt;ins style=&quot;font-weight: bold; text-decoration: none;&quot;&gt;{{SERVER}} &lt;/ins&gt;main website].&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class=&quot;diff-marker&quot;&gt;&lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;br/&gt;&lt;/td&gt;&lt;td class=&quot;diff-marker&quot;&gt;&lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;br/&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class=&quot;diff-marker&quot;&gt;&lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;To run the code in this guide, you will need the following installed:&lt;/div&gt;&lt;/td&gt;&lt;td class=&quot;diff-marker&quot;&gt;&lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;To run the code in this guide, you will need the following installed:&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;/table&gt;</summary>
		<author><name>Cora</name></author>
	</entry>
	<entry>
		<id>https://www.phidgets.com/docs21/index.php?title=Live_Data_Graphing&amp;diff=20448&amp;oldid=prev</id>
		<title>Cora at 21:42, 27 June 2012</title>
		<link rel="alternate" type="text/html" href="https://www.phidgets.com/docs21/index.php?title=Live_Data_Graphing&amp;diff=20448&amp;oldid=prev"/>
		<updated>2012-06-27T21:42:44Z</updated>

		<summary type="html">&lt;p&gt;&lt;/p&gt;
&lt;table style=&quot;background-color: #fff; color: #202122;&quot; data-mw=&quot;interface&quot;&gt;
				&lt;col class=&quot;diff-marker&quot; /&gt;
				&lt;col class=&quot;diff-content&quot; /&gt;
				&lt;col class=&quot;diff-marker&quot; /&gt;
				&lt;col class=&quot;diff-content&quot; /&gt;
				&lt;tr class=&quot;diff-title&quot; lang=&quot;en&quot;&gt;
				&lt;td colspan=&quot;2&quot; style=&quot;background-color: #fff; color: #202122; text-align: center;&quot;&gt;← Older revision&lt;/td&gt;
				&lt;td colspan=&quot;2&quot; style=&quot;background-color: #fff; color: #202122; text-align: center;&quot;&gt;Revision as of 21:42, 27 June 2012&lt;/td&gt;
				&lt;/tr&gt;&lt;tr&gt;&lt;td colspan=&quot;2&quot; class=&quot;diff-lineno&quot; id=&quot;mw-diff-left-l1&quot;&gt;Line 1:&lt;/td&gt;
&lt;td colspan=&quot;2&quot; class=&quot;diff-lineno&quot;&gt;Line 1:&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class=&quot;diff-marker&quot;&gt;&lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;&amp;lt;!-- CATEGORIES --&amp;gt;&lt;/div&gt;&lt;/td&gt;&lt;td class=&quot;diff-marker&quot;&gt;&lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;&amp;lt;!-- CATEGORIES --&amp;gt;&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class=&quot;diff-marker&quot;&gt;&lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;[[Category:fileIO]]&lt;/div&gt;&lt;/td&gt;&lt;td class=&quot;diff-marker&quot;&gt;&lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;[[Category:fileIO]]&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td colspan=&quot;2&quot; class=&quot;diff-side-deleted&quot;&gt;&lt;/td&gt;&lt;td class=&quot;diff-marker&quot; data-marker=&quot;+&quot;&gt;&lt;/td&gt;&lt;td style=&quot;color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #a3d3ff; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;&lt;ins style=&quot;font-weight: bold; text-decoration: none;&quot;&gt;[[Category:Application Guides]]&lt;/ins&gt;&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class=&quot;diff-marker&quot;&gt;&lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;br/&gt;&lt;/td&gt;&lt;td class=&quot;diff-marker&quot;&gt;&lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;br/&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class=&quot;diff-marker&quot;&gt;&lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;The project described here is for using various Python libraries for creating a MATLAB-like graphing program, which scrolls the graph in real time.   &lt;/div&gt;&lt;/td&gt;&lt;td class=&quot;diff-marker&quot;&gt;&lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;The project described here is for using various Python libraries for creating a MATLAB-like graphing program, which scrolls the graph in real time.   &lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;/table&gt;</summary>
		<author><name>Cora</name></author>
	</entry>
	<entry>
		<id>https://www.phidgets.com/docs21/index.php?title=Live_Data_Graphing&amp;diff=20359&amp;oldid=prev</id>
		<title>Cora: Created page with &quot;&lt;!-- CATEGORIES --&gt; Category:fileIO  The project described here is for using various Python libraries for creating a MATLAB-like graphing program, which scrolls the graph ...&quot;</title>
		<link rel="alternate" type="text/html" href="https://www.phidgets.com/docs21/index.php?title=Live_Data_Graphing&amp;diff=20359&amp;oldid=prev"/>
		<updated>2012-06-25T17:03:33Z</updated>

		<summary type="html">&lt;p&gt;Created page with &amp;quot;&amp;lt;!-- CATEGORIES --&amp;gt; &lt;a href=&quot;/docs21/Category:FileIO&quot; title=&quot;Category:FileIO&quot;&gt;Category:fileIO&lt;/a&gt;  The project described here is for using various Python libraries for creating a MATLAB-like graphing program, which scrolls the graph ...&amp;quot;&lt;/p&gt;
&lt;p&gt;&lt;b&gt;New page&lt;/b&gt;&lt;/p&gt;&lt;div&gt;&amp;lt;!-- CATEGORIES --&amp;gt;&lt;br /&gt;
[[Category:fileIO]]&lt;br /&gt;
&lt;br /&gt;
The project described here is for using various Python libraries for creating a MATLAB-like graphing program, which scrolls the graph in real time.  &lt;br /&gt;
&lt;br /&gt;
{|&lt;br /&gt;
|Practical concepts covered are (click on links to see other projects on that topic):&lt;br /&gt;
* Data Logging&lt;br /&gt;
** [[:Category:FileIO|Writing to a text file]]&lt;br /&gt;
** Using Phidgets with Python&lt;br /&gt;
** (Alternative to) Using Phidgets with MATLAB&lt;br /&gt;
* Analyzing your Phidget Data&lt;br /&gt;
|width=&amp;quot;45px&amp;quot;|&amp;amp;nbsp;&lt;br /&gt;
|[[Image:Livegraph-temp-screenshot.png|600px|link=|alt=]]&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
{| style=&amp;quot;border:1px solid darkgray;&amp;quot; cellpadding=&amp;quot;5px;&amp;quot;&lt;br /&gt;
|-&lt;br /&gt;
|&amp;#039;&amp;#039;&amp;#039;Time:&amp;#039;&amp;#039;&amp;#039;&lt;br /&gt;
|About one day of work installing libraries and adapting code&lt;br /&gt;
|-&lt;br /&gt;
|&amp;#039;&amp;#039;&amp;#039;Special Needed Tools:&amp;#039;&amp;#039;&amp;#039;&lt;br /&gt;
|None&lt;br /&gt;
|-&lt;br /&gt;
|&amp;#039;&amp;#039;&amp;#039;Materials and Phidgets:&amp;#039;&amp;#039;&amp;#039;&lt;br /&gt;
|One Phidget Thermocouple board, USB cable, and thermocouple&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
As with any of our [[Application Guides|described projects]], Phidgets takes care of the electrical component design.  Here, we show how to collect the data and display it in a slick manner.  &lt;br /&gt;
&lt;br /&gt;
If you just want to log data and save it to a file, you probably want to start with our [[Data Logging With a Thermocouple]] application guide, which does exactly that.  This application guide focuses on the graphical display of data over time.&lt;br /&gt;
&lt;br /&gt;
__TOC__&lt;br /&gt;
&lt;br /&gt;
==Introduction==&lt;br /&gt;
&lt;br /&gt;
This project is a live GUI graphing application that displays data in real time, in a scrolling graph.  This type of application - written in Python - can capture low-speed data and display it, and hence is a good alternative to MATLAB graphics when you wish to use events in your code.  Python also offers fast numerical processing via the NumPy library and so can be a numerical alternative to MATLAB as well.&lt;br /&gt;
&lt;br /&gt;
Although we use a Phidget thermocouple board (such as the [http://www.phidgets.com/products.php?product_id=1051 Phidget 1051 1-Thermocouple Board] or the [http://www.phidgets.com/products.php?product_id=1048 Phidget 1048 4-Thermocouple Board]), this code can be adapted for nearly any Phidget, as shown by the use of it for a Phidget DC Motor Controller in the [[#Extending with Other Phidgets and Widgets|Extra Credit section]].&lt;br /&gt;
&lt;br /&gt;
The GUI program has automatic axes scaling and scrolling as this smaller-than-reality (and low resolution) animated GIF shows:&lt;br /&gt;
&lt;br /&gt;
[[File:out_sm.gif|link=|alt=]]&lt;br /&gt;
&lt;br /&gt;
==Phidgets==&lt;br /&gt;
&lt;br /&gt;
To use the code in this guide as-is, you will need to have a Phidget Temperature Sensor and a thermocouple.&lt;br /&gt;
&lt;br /&gt;
Some example ways to set this up are:&lt;br /&gt;
{| style=&amp;quot;border:1px solid darkgray;&amp;quot; cellpadding=&amp;quot;5px;&amp;quot;&lt;br /&gt;
|- style=&amp;quot;background: #c0c0c0;&amp;quot;&lt;br /&gt;
!Example Setup&lt;br /&gt;
!Strengths&lt;br /&gt;
|- style=&amp;quot;background: #efefef;&amp;quot;&lt;br /&gt;
|&lt;br /&gt;
*[http://www.phidgets.com/products.php?product_id=1051 1051 - PhidgetTemperatureSensor 1-Input], plus&lt;br /&gt;
*[http://www.phidgets.com/products.php?product_id=3107 3107 - TPK-01 Bead Probe K-Type Thermocouple (-50°C to +200°C)]&lt;br /&gt;
| Basic thermocouple setup&lt;br /&gt;
|- style=&amp;quot;background: #efefef;&amp;quot;&lt;br /&gt;
|&lt;br /&gt;
*[http://www.phidgets.com/products.php?product_id=1048 1048 - PhidgetTemperatureSensor 4-Input], plus&lt;br /&gt;
*[http://www.phidgets.com/products.php?product_id=3107 3107 - TPK-01 Bead Probe K-Type Thermocouple (-50°C to +200°C)]&lt;br /&gt;
| Ability to measure multiple points&lt;br /&gt;
|- style=&amp;quot;background: #efefef;&amp;quot;&lt;br /&gt;
|&lt;br /&gt;
*[http://www.phidgets.com/products.php?product_id=1051 1051 - PhidgetTemperatureSensor 1-Input], plus&lt;br /&gt;
*[http://www.phidgets.com/products.php?product_id=3110 3110 - TPK-01H Bead Probe K-Type Thermocouple (-50°C to +785°C)]&lt;br /&gt;
| Wide temperature range thermocouple&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
Of course, these are only examples - any thermocouple with either Temperature Sensor Phidget board will work.&lt;br /&gt;
&lt;br /&gt;
We will log data from thermocouple port 0.  On a one-input board, this is the only thermocouple input; on a four-input board, make sure you have a thermocouple plugged in to sensor port 0:&lt;br /&gt;
&lt;br /&gt;
[[Image:App guide templogger 1048Leads.png|600px|link=|alt=]]&lt;br /&gt;
&lt;br /&gt;
Once you have your Phidget assembled with a thermocouple in Port 0, continue on to installing libraries.&lt;br /&gt;
&lt;br /&gt;
==Setting up and Installing Libraries==&lt;br /&gt;
&lt;br /&gt;
The libraries used here are primarily Python libraries.  This makes them a good alternative to the graphics in MATLAB.  Python and MATLAB share many commonalities, such as:&lt;br /&gt;
* They are interpreted languages&lt;br /&gt;
* They have good online documentation and a large user base&lt;br /&gt;
* They run on all major operating systems, without much code difference&lt;br /&gt;
* You can use them to write code to do matrix analysis, or GUI display&lt;br /&gt;
&lt;br /&gt;
However, there are a few advantages to using Python, especially with Phidgets, instead of MATLAB:&lt;br /&gt;
* The Phidget API in MATLAB is essentially using the C library calls from MATLAB.  In Python, you can make calls directly.&lt;br /&gt;
* You can listen to and use events in Python, but not in MATLAB.&lt;br /&gt;
* Python is free.&lt;br /&gt;
* Python has an extensive number of libraries to interface your Phidget with other programs, such as R, GRASS and PostGIS, Octave (free MATLAB), online CGI applications, and more.&lt;br /&gt;
&lt;br /&gt;
In this guide, we will use some of the GUI and matrix/vector math libraries in Python.  These will allow us to create a full application which graphs, scales, exports data, exports images, and more in under 350 lines of code.&lt;br /&gt;
&lt;br /&gt;
===Libraries Needed===&lt;br /&gt;
&lt;br /&gt;
First, make sure you have followed the Getting Started guide for your Temperature Sensor, found its product page on our [http://www.phidgets.com main website].&lt;br /&gt;
&lt;br /&gt;
To run the code in this guide, you will need the following installed:&lt;br /&gt;
# [http://www.python.org Python]&lt;br /&gt;
# The Phidget Libraries installed for [[Software Overview#Operating System Support|your operating system]]&lt;br /&gt;
# The Phidget Python module installed and tested, as described on our [[Language - Python]] page&lt;br /&gt;
# [http://www.wxpython.org WxPython]&lt;br /&gt;
# [http://matplotlib.sourceforge.net Matplotlib]&lt;br /&gt;
# [http://numpy.scipy.org NumPy and SciPy] (these provide much of the the matrix and array functionality in MATLAB)&lt;br /&gt;
&lt;br /&gt;
Installing hints by operating system are below.&lt;br /&gt;
&lt;br /&gt;
===Windows and Mac OS X===&lt;br /&gt;
&lt;br /&gt;
First, figure out which version of Python you want to download. &lt;br /&gt;
&lt;br /&gt;
&amp;#039;&amp;#039;&amp;#039;Note&amp;#039;&amp;#039;&amp;#039; that as of the writing of this guide, there was only &amp;#039;&amp;#039;one&amp;#039;&amp;#039; version of Python which would run NumPy/SciPy, Matplotlib, and WxPython, and it is 32-bit:&lt;br /&gt;
* WxPython [http://wxpython.org/download.php#stable runs with Python 2.6 or 2.7]&lt;br /&gt;
* Matplotlib [http://matplotlib.sourceforge.net/users/installing.html#build-requirements runs with Python 2.X (2.4 or later, but not 3), and then only 32 bit]&lt;br /&gt;
* NumPy [http://www.scipy.org/Download seems to prefer Python 2.6], on reports from our customers. &lt;br /&gt;
However, NumPy 1.5 release notes says it is compatible with later Python 2.X versions, so you may be able to get it to work.&lt;br /&gt;
&lt;br /&gt;
So as of this writing, you&amp;#039;ll want to download Python 2.6, 32 bit version.  &lt;br /&gt;
&lt;br /&gt;
If this has changed, on Windows and Mac, it can be quite obtuse to figure out which versions you need for all of the software.  If you can use a 32-bit version, the 32-bit packages from [http://www.enthought.com/products/epd.php Enthought Python] are free and include all of the needed libraries except the Phidget components.  They also offer 64-bit versions for a subscription as of this writing, but you must do your own research there as we are not affiliated with them.  You can also try [http://code.google.com/p/pythonxy/ Python(x,y)], another option to get all of the libraries installed on a non-Linux system.&lt;br /&gt;
&lt;br /&gt;
Once you have the right version of Python installed, you can install the Phidget libraries as discussed in the Linux section of our [[Language - Python]] page.&lt;br /&gt;
&lt;br /&gt;
===Linux===&lt;br /&gt;
&lt;br /&gt;
To install these libraries on Linux, it usually suffices to do:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;div class=source&amp;gt;&lt;br /&gt;
&amp;lt;syntaxhighlight lang=bash&amp;gt;&lt;br /&gt;
sudo apt-get install python python-wxtools python-matlibplot python-numpy&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&amp;lt;/div&amp;gt;&lt;br /&gt;
&lt;br /&gt;
And then you can install the Phidget libraries as discussed in the Linux section of our [[Language - Python]] page.&lt;br /&gt;
&lt;br /&gt;
==Algorithm==&lt;br /&gt;
&lt;br /&gt;
The algorithm is stripped down to:&lt;br /&gt;
# A single timer which re-scales and re-draws the plot (i.e. the [[#GUI|GUI]]), and &lt;br /&gt;
# A Phidget event function which writes [[#Data|data]] to the array that gets drawn&lt;br /&gt;
&lt;br /&gt;
For simplicity here, and because only one thread is ever writing to the data array, mutual exclusion is not used.  This can create interesting background behaviour, as discussed in the extra credit [[#Mutual Exclusion|Mutual Exclusion]] section below.&lt;br /&gt;
&lt;br /&gt;
===GUI===&lt;br /&gt;
&lt;br /&gt;
The best way to learn what the GUI does and how it works is perhaps to refer to the code itself and play with it.  But we offer some explanation here for the [[#Back-End Rendering|back end]] and for the [[#Set Up and Scaling|setup and scaling]] of the graph.&lt;br /&gt;
&lt;br /&gt;
====Back-End Rendering====&lt;br /&gt;
&lt;br /&gt;
To render graphics in Python, we simply pass commands to the back-end.  In this case, we&amp;#039;ll be passing commands to matplotlib, which will in turn pass its commands to the GUI back-end.  Hence, we import both WxPython (our backend) and matplotlib at the same time:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;div class=&amp;quot;source&amp;quot;&amp;gt;&lt;br /&gt;
&amp;lt;syntaxhighlight lang=python&amp;gt;&lt;br /&gt;
import matplotlib       # Provides the graph figures&lt;br /&gt;
matplotlib.use(&amp;#039;WXAgg&amp;#039;) # matplotlib needs a GUI (layout), we use wxPython&lt;br /&gt;
&lt;br /&gt;
from matplotlib.figure import Figure&lt;br /&gt;
from matplotlib.backends.backend_wxagg import FigureCanvasWxAgg as FigCanvas&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&amp;lt;/div&amp;gt;&lt;br /&gt;
&lt;br /&gt;
After setting up the main structure for the GUI (see the code for plot layout, etc), the actual &amp;#039;&amp;#039;drawing&amp;#039;&amp;#039; that occurs, which makes the graph scroll - happens via a timer.  This timer triggers a re-draw of the canvas (via the {{Code|onRedrawTimer()}} function).  Here is where we attach the timer to the redraw function:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;div class=&amp;quot;source&amp;quot;&amp;gt;&lt;br /&gt;
&amp;lt;syntaxhighlight lang=python&amp;gt;&lt;br /&gt;
# This times fires every 100 ms to redraw the graphs&lt;br /&gt;
self.redrawTimer = wx.Timer(self)&lt;br /&gt;
self.Bind(wx.EVT_TIMER, self.onRedrawTimer, self.redrawTimer)        &lt;br /&gt;
self.redrawTimer.Start(100)&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&amp;lt;/div&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Then, the redrawTimer function can simply be:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;div class=&amp;quot;source&amp;quot;&amp;gt;&lt;br /&gt;
&amp;lt;syntaxhighlight lang=python&amp;gt;&lt;br /&gt;
def onRedrawTimer(self, event): &lt;br /&gt;
    self.drawPlot()&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&amp;lt;/div&amp;gt;&lt;br /&gt;
&lt;br /&gt;
And in drawPlot(), we can read the array, set the axes, and draw it.  Because the [[#Data|data is updated by Phidget events]], we just grab whatever is in the array and not worry about doing the updating of the data itself in the GUI.  If a new point was added &lt;br /&gt;
&lt;br /&gt;
In the attached code, we also have a handler in {{Code|onRedrawTimer}} to catch exceptions for when the array lengths do not match (i.e. we are reading the arrays when they are being written to).  This is discussed more in the [[#Mutual Exclusion|Mutual Exclusion]] section below.&lt;br /&gt;
&lt;br /&gt;
====Set Up and Scaling====&lt;br /&gt;
&lt;br /&gt;
The colour and style of the lines and plot are handled in an initialization function once - i.e. {{Code|initPlot()}}.  Then those settings are remembered and activated within matplotlib when we call the set_data and draw functions later for every redraw.  For example, the yellow temperature line style (the blue line is a running average) is set in {{Code|initPlot()}} as:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;div class=&amp;quot;source&amp;quot;&amp;gt;&lt;br /&gt;
&amp;lt;syntaxhighlight lang=python&amp;gt;&lt;br /&gt;
self.plotData = self.axes.plot(&lt;br /&gt;
    self.data, &lt;br /&gt;
    linewidth=1,&lt;br /&gt;
    color=(1, 1, 0),&lt;br /&gt;
    )[0]&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&amp;lt;/div&amp;gt;&lt;br /&gt;
&lt;br /&gt;
This is also the line where the actual data array connected with the line - i.e. {{Code|self.data}} - gets attached for the first time.&lt;br /&gt;
&lt;br /&gt;
Then the {{Code|drawPlot()}} function (via the redraw timer) draws that line with:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;div class=&amp;quot;source&amp;quot;&amp;gt;&lt;br /&gt;
&amp;lt;syntaxhighlight lang=python&amp;gt;&lt;br /&gt;
self.plotData.set_data(np.array(self.time), np.array(self.data))&lt;br /&gt;
self.canvas.draw()&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&amp;lt;/div&amp;gt;&lt;br /&gt;
&lt;br /&gt;
The only data that gets drawn visually to the user is the data between the x/y minimum and maximum values on the plot.  So we can get the plot to scale automatically in the vertical direction by setting the axes to the limits of the data, plus a buffer - this happens in {{Code|drawPlot()}} right before the actual refresh draw occurs.  &lt;br /&gt;
&lt;br /&gt;
We can also get the x-data to scale the same way, such that the far right side of the x-axis always matches the last point in our data.  If the x-axis is always a fixed width, this makes the graph appear as if the data are scrolling through it.  You can play around with these parameters to make the vertical axis fixed, or the x-axis expand as data is collected, or any number of display options.&lt;br /&gt;
&lt;br /&gt;
===Data===&lt;br /&gt;
&lt;br /&gt;
The data for a temperature sensor is straightforward as you simply have to display the sensor value.  Other Phidgets, such as the [[#Extending with Other Phidgets and Widgets | example below]] using a Phidget Motor Controller, need various levels of calculation prior to display.&lt;br /&gt;
&lt;br /&gt;
The main complexity here is creating a data array which remains the same size.  If we just keep adding (appending) data to an array&lt;br /&gt;
&lt;br /&gt;
If you have a normal desktop-power computer, writing to a data array within your event handling function should work fine.  In this example, the GUI components put a large load on your processor, so if your computer is not relatively fast, you might have to set up a [[General Phidget Programming#Logic Code|data polling method]] rather than using events.  But here, we attach the function {{Code|temperatureChanged}} to the Phidget data handler:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;div class=&amp;quot;source&amp;quot;&amp;gt;&lt;br /&gt;
&amp;lt;syntaxhighlight lang=python&amp;gt;&lt;br /&gt;
thermocouple.setOnTemperatureChangeHandler(temperatureChanged)&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&amp;lt;/div&amp;gt;&lt;br /&gt;
&lt;br /&gt;
And then our {{Code|temperatureChanged()}} function records the time and further calls an {{Code|updateTemperature()}} function with the time and temperature.  The {{Code|updateTemperature()}} function looks like this:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;div class=&amp;quot;source&amp;quot;&amp;gt;&lt;br /&gt;
&amp;lt;syntaxhighlight lang=python line start=1&amp;gt;&lt;br /&gt;
def updateTemperature(self,temperature,time):&lt;br /&gt;
&lt;br /&gt;
    avgSum = 0&lt;br /&gt;
    window = self.avgOver if self.avgOver &amp;lt; len(self.data) else len(self.data)&lt;br /&gt;
    for a in range(window):&lt;br /&gt;
        avgSum = avgSum + self.data[(-1 * a)]&lt;br /&gt;
    avgSum = avgSum / window&lt;br /&gt;
    self.avgData.append(float(avgSum))&lt;br /&gt;
&lt;br /&gt;
    self.data.append(float(temperature))&lt;br /&gt;
    self.time.append(float(time))&lt;br /&gt;
    self.totalTime = time&lt;br /&gt;
&lt;br /&gt;
    if len(self.data) &amp;gt; self.maximumArray:&lt;br /&gt;
        global looped&lt;br /&gt;
        if not looped:&lt;br /&gt;
            print &amp;quot;Starting re-use of graph arrays for efficiency...&amp;quot;&lt;br /&gt;
            looped = True&lt;br /&gt;
        self.time.pop(0)&lt;br /&gt;
        self.avgData.pop(0)&lt;br /&gt;
        self.data.pop(0)&lt;br /&gt;
&lt;br /&gt;
    self.fileTime.append(float(time))&lt;br /&gt;
    self.fileTemperature.append(float(temperature))&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&amp;lt;/div&amp;gt;&lt;br /&gt;
&lt;br /&gt;
* Lines 3-7 calculate the average.  This is over the latest data set of length {{Code|window}}.&lt;br /&gt;
* Lines 8-12 appends all the data of interest to each array.  &lt;br /&gt;
** The average goes onto {{Code|self.avgData}}&lt;br /&gt;
** The time goes onto {{Code|self.time}}&lt;br /&gt;
** The temperature goes onto {{Code|self.data}}&lt;br /&gt;
* Lines 14-21 checks to see if the array exceeded our maximum.  &lt;br /&gt;
** If it does, the first data points are popped of and thereby discarded.&lt;br /&gt;
* Lines 23-24 save both time and temperature again.  The {{Code|fileTime}} and {{Code|fileTemperature}} variables save all data to export to a text file later if desired.&lt;br /&gt;
&lt;br /&gt;
And that&amp;#039;s it for recording data.  In this way, all data is saved in the file variables, and a moving array of fixed length handles the data to be shown on the graph.  &lt;br /&gt;
&lt;br /&gt;
Using a fixed-width moving array makes the code run almost forever.  The file variables get longer and longer, but nothing is done with them until a text file is written.  Not using a fixed-width array for the displayed data, however, will eventually cause enough lag in the GUI redraws to slow - and then stall - the graphical output.&lt;br /&gt;
&lt;br /&gt;
==Putting it All Together==&lt;br /&gt;
&lt;br /&gt;
Ready to run the code itself?  Here it is:&lt;br /&gt;
&lt;br /&gt;
[[File:Temp_visual_logger.py]]&lt;br /&gt;
&lt;br /&gt;
You can run the code as described by operating system on the [[Language - Python]] page.&lt;br /&gt;
&lt;br /&gt;
==Extra Credit==&lt;br /&gt;
&lt;br /&gt;
===Exporting Data===&lt;br /&gt;
&lt;br /&gt;
If you run the program, you may note that there is a {{Code|File}} menu that appears in the normal upper menu location.  The actual location depends on your OS - it may be on the upper top bar on Mac or Linux Unity.  &lt;br /&gt;
&lt;br /&gt;
The File menu has two options of interest here - Save as Image, and Save as CSV.  If you download and read the code, you&amp;#039;ll see the functions (near the bottom of the file) that provide the drive behind this, and they&amp;#039;re quite simple.  This allows you to save &amp;#039;&amp;#039;all&amp;#039;&amp;#039; of the current data in a CSV, or, as an image, the part of the data on the current graph:&lt;br /&gt;
&lt;br /&gt;
[[Image:Livegraph-temp-saveaspng.png|800px|link=|alt=]]&lt;br /&gt;
&lt;br /&gt;
===Extending with Other Phidgets and Widgets===&lt;br /&gt;
&lt;br /&gt;
Using the code as a place to start, you don&amp;#039;t just have to have one scrolling graph, you can have many.  You can also add buttons, sliders, input boxes, etc. and process on them to drive your Phidget and see the output.  &lt;br /&gt;
&lt;br /&gt;
For example, here is the live graph program adapted to control a DC motor for testing control loops - in this case, a PID (Proportional, Integral, Derivative) constant rotation loop.  The inputs at the bottom allow the loop to be changed, and the two graphs allow both the state of the motor, and the state of the control loop, to be displayed at the same time:&lt;br /&gt;
&lt;br /&gt;
[[Image:Livegraph-motor-example.png|800px|link=|alt=]]&lt;br /&gt;
&lt;br /&gt;
===Mutual Exclusion===&lt;br /&gt;
&lt;br /&gt;
We don&amp;#039;t include mutual exclusion in the attached code.  The best way to implement this code (and the most safe, for a commercial application) would be to write to the data array in a thread which communicates with the GUI thread that reads it.  Reading would not be allowed until the writing thread had completed writing an entire event.&lt;br /&gt;
&lt;br /&gt;
Without this mutual exclusion, there is a chance that the &amp;quot;draw&amp;quot; thread will trigger and the data from the Time or Data array without the other array matching it in length.  This array mismatch error can be caught, and that draw event skipped.  This is an annoyance, but will not mess up the data arrays themselves, because only one thread is writing to them (the event thread from the Phidget).  &lt;br /&gt;
&lt;br /&gt;
If, however, you were to deploy this code long-term, or wanted more than one function to write to the arrays, you would need to implement some sort of mutually exclusive method of writing to the data array.&lt;/div&gt;</summary>
		<author><name>Cora</name></author>
	</entry>
</feed>