<div dir="ltr"><div class="gmail_default" style="font-size:small">Hi Guilherme,</div><div class="gmail_default" style="font-size:small"><br></div><div class="gmail_default" style="font-size:small">Sorry about the delay in response.  The issue is simply that you need to make sure that when you call gsn_add_polyxxxx, the variable on the left side of the &quot;=&quot; is unique every time.</div>
<div class="gmail_default" style="font-size:small"><br></div><div class="gmail_default" style="font-size:small">Usually when you see this type of error:</div><div class="gmail_default" style="font-size:small"><br></div><div class="gmail_default" style="font-size:small">
<div class="gmail_default">warning:TransformPreDraw: tfPolyDrawList element 127 is invalid</div><div><br></div><div>it has to do with the variable not being unique.</div></div><div class="gmail_default" style="font-size:small">
<br></div><div class="gmail_default" style="font-size:small">You almost had it, as you defined &quot;error_bars&quot; and &quot;centers&quot; as &quot;id&quot; arrays.  But, these are defined inside of a larger loop across &quot;i&quot;, and so every time you go through another iteration of &quot;i&quot;, the old error_bars and centers ids were getting clobbered and reset.</div>
<div class="gmail_default" style="font-size:small"><br></div><div class="gmail_default" style="font-size:small">One way around this is to not predefine any arrays at all, and instead just create a dummy attribute that you can attach to &quot;plot&quot;, and make sure this dummy attribute has a unique name every time.  Here&#39;s one way to do that:</div>
<div class="gmail_default" style="font-size:small"><br></div><div class="gmail_default" style="font-size:small"><div class="gmail_default"><font face="courier new, monospace">    tmp_str = &quot;centers&quot; + i*10 + t   ; give attr a unique name</font></div>
<div class="gmail_default"><font face="courier new, monospace">    plot@$tmp_str$   = gsn_add_polymarker(wks,plot(0,0),t,pin_n(t),polyres)</font></div><div class="gmail_default"><div class="gmail_default"><font face="courier new, monospace">    tmp_str = &quot;error_bar&quot; + i*10 + t</font></div>
<div class="gmail_default"><font face="courier new, monospace">    plot@$tmp_str$ = gsn_add_polyline(wks,plot(0,0),(/t,t/),(/pin_n(t)+stddev(p</font><span style="font-family:&#39;courier new&#39;,monospace">in_n),pin_n(t)-stddev(pin_n)/),polyres)</span></div>
<div><br></div><div>--Mary</div><div><br></div></div></div></div><div class="gmail_extra"><br><br><div class="gmail_quote">On Mon, Jul 21, 2014 at 11:52 AM, Guilherme Martins <span dir="ltr">&lt;<a href="mailto:jgmsantos@gmail.com" target="_blank">jgmsantos@gmail.com</a>&gt;</span> wrote:<br>
<blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><div dir="ltr">Hi all,<div><br></div><div>I&#39;m trying to plot the error bars following the example:</div><div><br></div>
<div><a href="http://www.ncl.ucar.edu/Applications/Scripts/xy_13.ncl" target="_blank">http://www.ncl.ucar.edu/Applications/Scripts/xy_13.ncl</a></div>

<div><br></div><div>The bars are ok, but I have the error:</div><div><br></div><div>fatal:Number of dimensions in parameter (0) of (NhlAddPrimitive) is (2), (1) dimensions were expected</div><div><br></div><div>When insert the error bars.</div>


<div><br></div><div>I&#39;m using NCL 6.2.0. My files are in attached.</div><span class="HOEnZb"><font color="#888888"><div><br></div><div>Guilherme.<br></div><div><div><br></div>-- <br><div dir="ltr"><div><a href="https://sites.google.com/site/jgmsantos/" target="_blank">https://sites.google.com/site/jgmsantos/</a><br>


<div><div><div></div></div></div></div><div><br></div></div>
</div></font></span></div>
<br>_______________________________________________<br>
ncl-talk mailing list<br>
List instructions, subscriber options, unsubscribe:<br>
<a href="http://mailman.ucar.edu/mailman/listinfo/ncl-talk" target="_blank">http://mailman.ucar.edu/mailman/listinfo/ncl-talk</a><br>
<br></blockquote></div><br></div>