<?xml version="1.0" encoding="utf-8"?>
<rss version="2.0" xmlns:atom="http://www.w3.org/2005/Atom">
	<channel>
		<title><![CDATA[Graph Forums — Modifying point series with Python script]]></title>
		<link>https://forum.padowan.dk/viewtopic.php?id=766</link>
		<atom:link href="https://forum.padowan.dk/extern.php?action=feed&amp;tid=766&amp;type=rss" rel="self" type="application/rss+xml" />
		<description><![CDATA[The most recent posts in Modifying point series with Python script.]]></description>
		<lastBuildDate>Tue, 01 Jan 2013 22:06:06 +0000</lastBuildDate>
		<generator>PunBB</generator>
		<item>
			<title><![CDATA[Re: Modifying point series with Python script]]></title>
			<link>https://forum.padowan.dk/viewtopic.php?pid=2092#p2092</link>
			<description><![CDATA[<p>ah! that&#039;s what I was searching for! Thanks!</p>]]></description>
			<author><![CDATA[null@example.com (GraphUser3546)]]></author>
			<pubDate>Tue, 01 Jan 2013 22:06:06 +0000</pubDate>
			<guid>https://forum.padowan.dk/viewtopic.php?pid=2092#p2092</guid>
		</item>
		<item>
			<title><![CDATA[Re: Modifying point series with Python script]]></title>
			<link>https://forum.padowan.dk/viewtopic.php?pid=2084#p2084</link>
			<description><![CDATA[<p>Unfortunately dir does not always show everything. You may therefore want to check the documentation, which is also installed with Graph: <a href="http://www.padowan.dk/doc/PluginDoc/GraphElem.html#id505437">http://www.padowan.dk/doc/PluginDoc/Gra … l#id505437</a></p>]]></description>
			<author><![CDATA[null@example.com (Ivan Johansen)]]></author>
			<pubDate>Thu, 27 Dec 2012 21:27:05 +0000</pubDate>
			<guid>https://forum.padowan.dk/viewtopic.php?pid=2084#p2084</guid>
		</item>
		<item>
			<title><![CDATA[Re: Modifying point series with Python script]]></title>
			<link>https://forum.padowan.dk/viewtopic.php?pid=2083#p2083</link>
			<description><![CDATA[<p>Thank you very much!</p><p>I was using the dir(Graph.Selected) and it didn&#039;t show the &quot;Points&quot; function, hence my being puzzled. Well if it&#039;s a simple list of tuple, I&#039;ll be playing with them any way I want now.</p><p>A grateful Graph User.</p>]]></description>
			<author><![CDATA[null@example.com (GraphUser3546)]]></author>
			<pubDate>Thu, 27 Dec 2012 19:14:06 +0000</pubDate>
			<guid>https://forum.padowan.dk/viewtopic.php?pid=2083#p2083</guid>
		</item>
		<item>
			<title><![CDATA[Re: Modifying point series with Python script]]></title>
			<link>https://forum.padowan.dk/viewtopic.php?pid=2081#p2081</link>
			<description><![CDATA[<p>You can use Graph.Selected.Points to access the points as a list. Every entry will be a tuple with a (x,y) coordinate. You can add, remove and change points as with any Python list. Here is an example that adds 1 to every x-coordinate and 2 to every y-coordinate:</p><div class="codebox"><pre><code>P = Graph.Selected.Points
for i in range(len(P)):
  P[i] = (P[i][0]+1, P[i][1]+2)</code></pre></div>]]></description>
			<author><![CDATA[null@example.com (Ivan Johansen)]]></author>
			<pubDate>Tue, 25 Dec 2012 16:06:43 +0000</pubDate>
			<guid>https://forum.padowan.dk/viewtopic.php?pid=2081#p2081</guid>
		</item>
		<item>
			<title><![CDATA[Modifying point series with Python script]]></title>
			<link>https://forum.padowan.dk/viewtopic.php?pid=2079#p2079</link>
			<description><![CDATA[<p>Greetings,</p><p>I&#039;m learning Python in order to automate some operations on Point Series in Graph. FYI, I have programmed in C++ and LabVIEW in the past, so I&#039;m not totally new to the coding world and object-oriented programming.</p><p>I believe I&#039;d need to use the &quot;GetPoint&quot; method to get the current value of data points, apply my operations to the data, then use the &quot;InsertPoint&quot; and &quot;DeletePoint&quot; methods to replace the old data with the new modified one.</p><p>So I select my Point Series and check that<br /></p><div class="codebox"><pre><code>type(Graph.Selected)</code></pre></div><p> confirms it&#039;s a &quot;Data.TPointSeries&quot;</p><p>From there, I should probably use something like :<br /></p><div class="codebox"><pre><code>Graph.Selected.GetPoint(self, *args)</code></pre></div><p>to get the point values, but looking at your SWIG-generated &quot;.py&quot; code, I can&#039;t figure out what are the arguments that the GetPoint expects. The same interrogation applies to the InsertPoint and DeletePoint methods for my needs.</p><p>Maybe I&#039;m wrong all the way too <img src="https://forum.padowan.dk/img/smilies/smile.png" width="15" height="15" alt="smile" /> Could you please guide me a bit in extracting data from a Point Series and modifying it through the Python interface?</p><p>Thank you very much!</p><p>EDIT: just a sample script adding 1 to x and 2 to y coordinates of all points in a series could do the trick too if it&#039;s easier for you.</p>]]></description>
			<author><![CDATA[null@example.com (GraphUser3546)]]></author>
			<pubDate>Sun, 23 Dec 2012 16:49:27 +0000</pubDate>
			<guid>https://forum.padowan.dk/viewtopic.php?pid=2079#p2079</guid>
		</item>
	</channel>
</rss>
