<?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>Aptech &#187; Answers for "Axis control with PlotXY()"</title>
	<atom:link href="http://www.aptech.com/questions/axis-control-with-plotxy/feed/" rel="self" type="application/rss+xml" />
	<link>http://www.aptech.com</link>
	<description></description>
	<lastBuildDate>Fri, 08 Feb 2013 19:12:28 +0000</lastBuildDate>
	<language>en-US</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.org/?v=3.4.1</generator>
		<item>
		<title>By: svannorden</title>
		<link>http://www.aptech.com/questions/axis-control-with-plotxy/#answer-2968</link>
		<comments>http://www.aptech.com/questions/axis-control-with-plotxy/#answer-2968#comments</comments>
		<pubDate>Tue, 18 Dec 2012 19:40:50 +0000</pubDate>
		<dc:creator>svannorden</dc:creator>
		
		<guid isPermaLink="false">http://www.aptech.com/questions/axis-control-with-plotxy/#answer-2968</guid>
		<description><![CDATA[Thanks! That fixes the problem. Here&#8217;s a slightly simpler version of delMissRows() that works just as well: proc delMissRows(x); local mask; mask = sumr(x .== miss(0,0)); // number of missing entries per row mask = mask .&#60; cols(x); // 1 &#8230; <a href="http://www.aptech.com/questions/axis-control-with-plotxy/#answer-2968">Continue reading <span class="meta-nav">&#8594;</span></a>]]></description>
			<content:encoded><![CDATA[<p>Thanks! That fixes the problem.</p>
<p>Here&#8217;s a slightly simpler version of delMissRows() that works just as well:</p>
<pre style="padding-left: 30px">proc delMissRows(x);
 local mask;

 mask = sumr(x .== miss(0,0)); // number of missing entries per row
 mask = mask .&lt; cols(x); // 1 if a row has some non-missing entries
 retp(selif(x,mask)); // returns only those rows where mask .== 1
endp;</pre>
]]></content:encoded>
			<wfw:commentRss>http://www.aptech.com/questions/axis-control-with-plotxy/#answer-2968/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>By: aptech</title>
		<link>http://www.aptech.com/questions/axis-control-with-plotxy/#answer-2964</link>
		<comments>http://www.aptech.com/questions/axis-control-with-plotxy/#answer-2964#comments</comments>
		<pubDate>Tue, 18 Dec 2012 18:03:37 +0000</pubDate>
		<dc:creator>aptech</dc:creator>
		
		<guid isPermaLink="false">http://www.aptech.com/questions/axis-control-with-plotxy/#answer-2964</guid>
		<description><![CDATA[This is a problem related to all of the columns being passed into plotXY that have only missing values. This has already been fixed in version 13.1 which will be released in January 2013. As a workaround here is a &#8230; <a href="http://www.aptech.com/questions/axis-control-with-plotxy/#answer-2964">Continue reading <span class="meta-nav">&#8594;</span></a>]]></description>
			<content:encoded><![CDATA[<p>This is a problem related to all of the columns being passed into <tt>plotXY</tt> that have only missing values. This has already been fixed in version 13.1 which will be released in January 2013.</p>
<p>As a workaround here is a procedure to remove all rows that only contain missing values.</p>
<pre>
<span class="color:#000099">new</span>;
<span class="color:#000099">struct</span> plotControl myPlot;
myplot = plotGetDefaults(<span class="color:#990099">"xy"</span>);
<span class="color:#000099">load</span> rawdataF;
PlotSetLegend(&#038;myplot,<span class="color:#990099">"off"</span>);
x = seqa(2009-0.25*cols(rawdataF),.25,cols(rawdataF));
plotXY(myPlot, x, delMissRows(rawdataF)');


<span class="color:#000099">proc</span> delMissRows(x);
	local mask, idx, xout, rtrim, xctr;
	
	<span class="color:#009900">//Which rows have as many missings as columns</span>
	mask = sumr(x .== miss(0,0));
	
	<span class="color:#009900">//Preallocate output matrix</span>
	rtrim = sumc(mask .== cols(x));
	xout = zeros(rows(x) - rtrim, cols(x));
	
	<span class="color:#009900">//Fill in xout</span>
	xctr = 1;
	<span class="color:#000099">for</span> i(1, rows(x), 1);
		<span class="color:#000099">if</span> mask[i] != cols(x);
			xout[xctr, .] = x[i,.];
			xctr = xctr + 1;
		<span class="color:#000099">endif</span>;
	<span class="color:#000099">endfor</span>;
	
	<span class="color:#000099">retp</span>(xout);	
<span class="color:#000099">endp</span>;
</pre>
]]></content:encoded>
			<wfw:commentRss>http://www.aptech.com/questions/axis-control-with-plotxy/#answer-2964/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>By: svannorden</title>
		<link>http://www.aptech.com/questions/axis-control-with-plotxy/#answer-2960</link>
		<comments>http://www.aptech.com/questions/axis-control-with-plotxy/#answer-2960#comments</comments>
		<pubDate>Mon, 17 Dec 2012 19:17:36 +0000</pubDate>
		<dc:creator>svannorden</dc:creator>
		
		<guid isPermaLink="false">http://www.aptech.com/questions/axis-control-with-plotxy/#answer-2960</guid>
		<description><![CDATA[Hi Jason. Thanks for your answer. Your example displays perfectly for me. I&#8217;ve tried to create a single example that reproduces the problem, using my original data saved in .fmt format as you suggested. (I can&#8217;t figure out how to &#8230; <a href="http://www.aptech.com/questions/axis-control-with-plotxy/#answer-2960">Continue reading <span class="meta-nav">&#8594;</span></a>]]></description>
			<content:encoded><![CDATA[<p>Hi Jason.</p>
<p>Thanks for your answer. Your example displays perfectly for me.</p>
<p>I&#8217;ve tried to create a single example that reproduces the problem, using my original data saved in .fmt format as you suggested. (I can&#8217;t figure out how to attach the .fmt file to this forum post, so I&#8217;ll send that separately by e-mail.) Here&#8217;s a program that should reproduce the problem.</p>
<pre style="padding-left: 30px">new;
struct plotControl myPlot;
myplot = plotGetDefaults("xy");
load rawdataF;
PlotSetLegend(&amp;myplot,"off");
plotxy(myplot,seqa(2009-0.25*cols(rawdataF),.25,cols(rawdataF)),rawdataF');</pre>
<p>This gives me a plot whose horizontal axis starts at 0, despite the fact that <em>rawdataF</em> is a 157&#215;170 matrix.</p>
<p>&nbsp;</p>
<p>Thanks in advance for your help.</p>
<p>&nbsp;</p>
<p>Simon</p>
]]></content:encoded>
			<wfw:commentRss>http://www.aptech.com/questions/axis-control-with-plotxy/#answer-2960/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>By: Aptech</title>
		<link>http://www.aptech.com/questions/axis-control-with-plotxy/#answer-2745</link>
		<comments>http://www.aptech.com/questions/axis-control-with-plotxy/#answer-2745#comments</comments>
		<pubDate>Sun, 09 Dec 2012 17:46:49 +0000</pubDate>
		<dc:creator>Aptech</dc:creator>
		
		<guid isPermaLink="false">http://www.aptech.com/questions/axis-control-with-plotxy/#answer-2745</guid>
		<description><![CDATA[I tried this program below and a few combinations (more curves, only one negative element, without using a plotcontrol struct) on Windows 7 and Linux with GAUSS 13.0.3. In all cases the x axis ranged from the minimum x value &#8230; <a href="http://www.aptech.com/questions/axis-control-with-plotxy/#answer-2745">Continue reading <span class="meta-nav">&#8594;</span></a>]]></description>
			<content:encoded><![CDATA[<p>I tried this program below and a few combinations (more curves, only one negative element, without using a plotcontrol struct) on Windows 7 and Linux with GAUSS 13.0.3. In all cases the <tt>x</tt> axis ranged from the minimum <tt>x</tt> value to the maximum <tt>x</tt> value.</p>
<pre><span style="color: #333399;">struct</span> plotControl myPlot;
myPlot = plotGetDefaults("xy");

x = seqa(1960, 0.25, 53*4);
y = cos(seqa(0.1, 0.1, rows(x)));
plotxy(myPlot, x,y);
</pre>
<p>Does this display correctly for you? Could you save your <tt>x</tt> and <tt>y</tt> variables as <tt>.fmt</tt> files with the <tt>save</tt> command and send them to support.</p>
]]></content:encoded>
			<wfw:commentRss>http://www.aptech.com/questions/axis-control-with-plotxy/#answer-2745/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
	</channel>
</rss>

<!-- Performance optimized by W3 Total Cache. Learn more: http://www.w3-edge.com/wordpress-plugins/

Served from: www.aptech.com @ 2013-02-09 01:39:56 --