<?xml version="1.0" encoding="utf-8"?>
<rss version="2.0" xmlns:atom="http://www.w3.org/2005/Atom">
	<channel>
		<title><![CDATA[Graph Forums — Plugin for Python]]></title>
		<link>https://forum.padowan.dk/viewtopic.php?id=1111</link>
		<atom:link href="https://forum.padowan.dk/extern.php?action=feed&amp;tid=1111&amp;type=rss" rel="self" type="application/rss+xml" />
		<description><![CDATA[The most recent posts in Plugin for Python.]]></description>
		<lastBuildDate>Sun, 02 Dec 2018 16:45:41 +0000</lastBuildDate>
		<generator>PunBB</generator>
		<item>
			<title><![CDATA[Re: Plugin for Python]]></title>
			<link>https://forum.padowan.dk/viewtopic.php?pid=3242#p3242</link>
			<description><![CDATA[<p>For those members who, like myself, are much more comfortable with Visual Basic and want to use Graph to display data, I suggest two methods to transfer point data.<br />1). Using a file. In VB, fill an array with data and write to a file in text format.<br />&nbsp; &nbsp; Here is an example of generating 2 files for magnitude and phase of a lowpass filter:-<br />&nbsp; &nbsp; &nbsp; &nbsp; Dim mag(80) As String<br />&nbsp; &nbsp; &nbsp; &nbsp; Dim phz(80) As String<br />&nbsp; &nbsp; &nbsp; &nbsp; Dim indx = 0<br />&nbsp; &nbsp; &nbsp; &nbsp; For w = 0.125 To 10 Step 0.125<br />&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; Dim c1 As New Complex(1, w)&nbsp; &nbsp;values<br />&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; Dim c2 As New Complex(1, 5 * w)<br />&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;mag(indx) = w.ToString &amp; &quot;,&quot; &amp; Complex.Abs(c1 /c2).ToString&nbsp; &nbsp; &nbsp; &#039;needs system.Numerics import and reference&nbsp; &nbsp; &nbsp;<br />&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; phz(indx) = w.ToString &amp; &quot;,&quot; &amp; ((c1 / c2).Phase*57.4).ToString&nbsp; &nbsp; &nbsp; &#039;to actually run this snippet<br />&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; indx += 1<br />&nbsp; &nbsp; &nbsp; &nbsp; Next<br />&nbsp; &nbsp; &nbsp; &nbsp; File.WriteAllLines(&quot;e:\plotmag.txt&quot;, mag)<br />&nbsp; &nbsp; &nbsp; &nbsp; File.WriteAllLines(&quot;e:\plotphase.txt&quot;, phz)<br />&nbsp; &nbsp; &nbsp; &nbsp; Console.ReadLine()</p><p>This is detailed but actual example. Note that data is converted from numeric to text format with the X data, then separator (comma), then Y data. Graph will also except a &#039;space&#039; as the separator.<br />In Graph, access these point data files with an &quot;import point data&quot; command.</p><p>2).EDITED Dec4 (Listbox ref removed)<br />This uses Ctrl C from a VB Windows Form application.<br />EXample:-<br />Create a Forms app with a button, and a TextBox.<br />Enter the following code;-<br />Public Class Form1<br />&nbsp; &nbsp; &#039;use textbox to collect values then select values manually and copy (ctrl c)<br />&nbsp; &nbsp; &#039;example collects squares of numbers to use with Graph<br />&nbsp; &nbsp; Private Sub Button1_Click(sender As System.Object, e As System.EventArgs) Handles Button1.Click<br />&nbsp; &nbsp; &nbsp; &nbsp; Dim j As Integer<br />&nbsp; &nbsp; &nbsp; &nbsp; For j = 1 To 10<br />&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;TextBox1.AppendText(j.ToString &amp; &quot; &quot; &amp; j ^ 2.ToString &amp; vbCrLf) &#039;multi-Line set to TRUE<br />&nbsp; &nbsp; &nbsp; &nbsp; Next<br />&nbsp; &nbsp; End Sub<br />End Class<br />After running the program select data from the TextBox, Copy (ctrl c) and paste into Graph &quot;Insert Point Data&quot;<br />Hope this will be useful.<br />Gord</p>]]></description>
			<author><![CDATA[null@example.com (gordc)]]></author>
			<pubDate>Sun, 02 Dec 2018 16:45:41 +0000</pubDate>
			<guid>https://forum.padowan.dk/viewtopic.php?pid=3242#p3242</guid>
		</item>
		<item>
			<title><![CDATA[Re: Plugin for Python]]></title>
			<link>https://forum.padowan.dk/viewtopic.php?pid=3241#p3241</link>
			<description><![CDATA[<p>There is some documentation here: <a href="https://www.padowan.dk/doc/PluginDoc/Graph.html#id500386">https://www.padowan.dk/doc/PluginDoc/Gr … l#id500386</a><br />Graph.FunctionList is basically just a list with all items shown in the function list in Graph. You can add, remove and delete functions, tangents, relations, etc. to Graph.FunctionList to have it reflect in the list in Graph.</p>]]></description>
			<author><![CDATA[null@example.com (Ivan Johansen)]]></author>
			<pubDate>Wed, 28 Nov 2018 18:29:26 +0000</pubDate>
			<guid>https://forum.padowan.dk/viewtopic.php?pid=3241#p3241</guid>
		</item>
		<item>
			<title><![CDATA[Re: Plugin for Python]]></title>
			<link>https://forum.padowan.dk/viewtopic.php?pid=3240#p3240</link>
			<description><![CDATA[<p>Thanks, I have installed the beta 4.5 and Python 3.7 is included. The example you gave works perfectly. I realize that time is needed to give help; if someone could point me to the Function List (which may be already on your home page) and how to use it.<br />gordc</p>]]></description>
			<author><![CDATA[null@example.com (gordc)]]></author>
			<pubDate>Tue, 27 Nov 2018 20:29:19 +0000</pubDate>
			<guid>https://forum.padowan.dk/viewtopic.php?pid=3240#p3240</guid>
		</item>
		<item>
			<title><![CDATA[Re: Plugin for Python]]></title>
			<link>https://forum.padowan.dk/viewtopic.php?pid=3239#p3239</link>
			<description><![CDATA[<p>Graph doesn&#039;t use matplotlib. There are some example plugins installed with Graph, and you are welcome to ask if you have any questions. </p><p>The documentation of the Python interfcae to Graph, which is installed with Graph, can also be found here:<br /><a href="https://www.padowan.dk/doc/PluginDoc/">https://www.padowan.dk/doc/PluginDoc/</a></p><p>The following shows how to add a function from Python:<br /></p><div class="codebox"><pre><code>F=Graph.TStdFunc(&quot;x^2+3x-5&quot;)
Graph.FunctionList.append(F)</code></pre></div>]]></description>
			<author><![CDATA[null@example.com (Ivan Johansen)]]></author>
			<pubDate>Sun, 25 Nov 2018 21:47:31 +0000</pubDate>
			<guid>https://forum.padowan.dk/viewtopic.php?pid=3239#p3239</guid>
		</item>
		<item>
			<title><![CDATA[Re: Plugin for Python]]></title>
			<link>https://forum.padowan.dk/viewtopic.php?pid=3237#p3237</link>
			<description><![CDATA[<p>Thanks. Before I install 4.4.5, I would like to know how, from the user&#039;s viewpoint, how Graph interfaces with Python 3.7. Does Graph replace matplotlib or are those graphing routines re-directed to Graph? matplotlib routines have a fairly steep learning curve so any simplification would be welcome. Just need an example of plotting Python with Graph 4.4.5.<br />gordc</p>]]></description>
			<author><![CDATA[null@example.com (gordc)]]></author>
			<pubDate>Sat, 24 Nov 2018 15:05:46 +0000</pubDate>
			<guid>https://forum.padowan.dk/viewtopic.php?pid=3237#p3237</guid>
		</item>
		<item>
			<title><![CDATA[Re: Plugin for Python]]></title>
			<link>https://forum.padowan.dk/viewtopic.php?pid=3235#p3235</link>
			<description><![CDATA[<p>Graph 4.4.2 uses Python 3.2 for plugin support. However the latest beta version of Graph 4.5 uses Python 3.7. With the beta version you also don&#039;t have to install Python yourself as it comes bundled with Graph.</p>]]></description>
			<author><![CDATA[null@example.com (Ivan Johansen)]]></author>
			<pubDate>Sun, 18 Nov 2018 12:27:06 +0000</pubDate>
			<guid>https://forum.padowan.dk/viewtopic.php?pid=3235#p3235</guid>
		</item>
		<item>
			<title><![CDATA[Plugin for Python]]></title>
			<link>https://forum.padowan.dk/viewtopic.php?pid=3232#p3232</link>
			<description><![CDATA[<p>I have Python 3.7 installed but Graph 4.4.2 does not recognize this as a plugin.<br />Q1. How do I get Graph to plot functions from Python?<br />Q2. Do I have to use matplotLib to make this work?<br />Thanks, gordc</p>]]></description>
			<author><![CDATA[null@example.com (gordc)]]></author>
			<pubDate>Sat, 17 Nov 2018 16:14:08 +0000</pubDate>
			<guid>https://forum.padowan.dk/viewtopic.php?pid=3232#p3232</guid>
		</item>
	</channel>
</rss>
