<div dir="ltr"><div class="gmail_default" style="font-size:small">Grace,</div><div class="gmail_default" style="font-size:small"><br></div><div class="gmail_default" style="font-size:small">I&#39;m confused by what you are asking for. You said the observed data didn&#39;t have a time dimension, but then you said it had &quot;one data per hour&quot;. This sounds like you have some kind of time data.</div><div class="gmail_default" style="font-size:small"><br></div><div class="gmail_default" style="font-size:small">In order to use gsn_csm_xy2, you need to have both sets of Y values be the same length, and be at the same X (in this case &quot;time&quot;) values.  </div><div class="gmail_default" style="font-size:small"><br></div><div class="gmail_default" style="font-size:small">If you have two different sets of X and Y axes values, then look at the gsn_csm_x2y2 function. There&#39;s an example at:</div><div class="gmail_default" style="font-size:small"><br></div><div class="gmail_default"><a href="http://www.ncl.ucar.edu/Applications/xy.shtml#ex20">http://www.ncl.ucar.edu/Applications/xy.shtml#ex20</a><br></div><div class="gmail_default"><br></div><div class="gmail_default">--Mary</div><div class="gmail_default"><br></div></div><div class="gmail_extra"><br><div class="gmail_quote">On Sat, Aug 15, 2015 at 7:07 PM, grace <span dir="ltr">&lt;<a href="mailto:313695096@qq.com" target="_blank">313695096@qq.com</a>&gt;</span> wrote:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><span style="font-family:&#39;lucida Grande&#39;,Verdana,&#39;Microsoft YaHei&#39;;line-height:24px"><font size="4" style="line-height:30px">Hi,all:</font></span><span style="font-family:&#39;lucida Grande&#39;,Verdana,&#39;Microsoft YaHei&#39;;line-height:23px"></span><div><font size="4"><font face="lucida Grande, Verdana, Microsoft YaHei"><span style="line-height:30px">    I am wondering how to plot xy2 plot with 1D data?</span></font></font></div><div style="font-family:&#39;lucida Grande&#39;,Verdana,&#39;Microsoft YaHei&#39;;line-height:23px"><span style="line-height:24px"><font size="4" style="line-height:30px">   I want to compare wrfout data with observed data in a xy2 plot with time as the X axis,</font></span></div><div style="font-family:&#39;lucida Grande&#39;,Verdana,&#39;Microsoft YaHei&#39;;line-height:23px"><span style="line-height:24px"><font size="4" style="line-height:30px">but the observed data are 1D without time  demension in a .txt file, a data per hour .</font></span></div><div style="font-family:&#39;lucida Grande&#39;,Verdana,&#39;Microsoft YaHei&#39;;line-height:23px"><span style="line-height:24px"><font size="4" style="line-height:30px">    I have  extract the wrfout data as 1D data in a .txt file :</font></span></div><div style="font-family:&#39;lucida Grande&#39;,Verdana,&#39;Microsoft YaHei&#39;;line-height:23px"><span style="line-height:24px"><font size="4" style="line-height:30px">;;;;;;;;;;;;;;;;;;;;;</font></span></div><div><font face="lucida Grande, Verdana, Microsoft YaHei" size="4"><span style="line-height:30px"><div>ascii_file = &quot;temp.txt&quot;</div><div>str = new(ntimes, &quot;string&quot;)</div><div>  do it =0, ntimes-1,1        ; TIME LOOP</div></span></font></div><div><font face="lucida Grande, Verdana, Microsoft YaHei" size="4"><span style="line-height:30px"><div>t2= wrf_user_getvar(a,&quot;T2&quot;,it)</div><div>      t2= t2-273.15</div><div>      t2@units = &quot;c&quot; </div><div><span style="white-space:pre-wrap">        </span>tt2=t2(it,98, 98)</div><div>    end if</div><div>   str(it) = sprintf(&quot;%12.8f&quot;, tt2)</div><div>end do </div></span></font></div><div><span style="font-family:&#39;lucida Grande&#39;,Verdana,&#39;Microsoft YaHei&#39;;line-height:24px"><font size="4" style="line-height:30px">   </font></span><font face="lucida Grande, Verdana, Microsoft YaHei" size="4"><span style="line-height:30px">asciiwrite(ascii_file, str)</span></font></div><div><font face="lucida Grande, Verdana, Microsoft YaHei" size="4"><span style="line-height:30px">;;;;;;;;;;;;;;;;;;;;;;;</span></font></div><div><font face="lucida Grande, Verdana, Microsoft YaHei" size="4"><span style="line-height:30px"><br></span></font></div><div><font face="lucida Grande, Verdana, Microsoft YaHei" size="4"><span style="line-height:30px">How can I plot the xyplot </span></font><span style="font-family:&#39;lucida Grande&#39;,Verdana,&#39;Microsoft YaHei&#39;;font-size:large;line-height:30px">with time as the X axis while data do not have time demension with the &quot;</span><span style="white-space:pre-wrap;line-height:normal">plot = gsn_csm_xy2(wks,time,t2,tob,resL,resR)</span><span style="font-family:&#39;lucida Grande&#39;,Verdana,&#39;Microsoft YaHei&#39;;font-size:large;line-height:30px">&quot;</span></div><div style="font-family:&#39;lucida Grande&#39;,Verdana,&#39;Microsoft YaHei&#39;;line-height:23px"><br></div><div style="font-family:&#39;lucida Grande&#39;,Verdana,&#39;Microsoft YaHei&#39;;line-height:23px"><span style="line-height:24px"><font size="4" style="line-height:30px">   Or do you guys have some advice?</font></span></div><div style="font-family:&#39;lucida Grande&#39;,Verdana,&#39;Microsoft YaHei&#39;;line-height:23px"><span style="line-height:24px"><font size="4" style="line-height:30px">    any information will be appreciated</font></span></div><br>_______________________________________________<br>
ncl-talk mailing list<br>
<a href="mailto:ncl-talk@ucar.edu">ncl-talk@ucar.edu</a><br>
List instructions, subscriber options, unsubscribe:<br>
<a href="http://mailman.ucar.edu/mailman/listinfo/ncl-talk" rel="noreferrer" target="_blank">http://mailman.ucar.edu/mailman/listinfo/ncl-talk</a><br>
<br></blockquote></div><br></div>