<div dir="ltr"><div style="font-family:arial,sans-serif;font-size:13px">Hi Mary,</div><div style="font-family:arial,sans-serif;font-size:13px"><br></div><div style="font-family:arial,sans-serif;font-size:13px">Thanks for the explanation.</div>
<div style="font-family:arial,sans-serif;font-size:13px"><br></div><div style="font-family:arial,sans-serif;font-size:13px">Guilherme.</div><div><br></div></div><div class="gmail_extra"><br><br><div class="gmail_quote">2014-07-24 12:05 GMT-03:00 Mary Haley <span dir="ltr"><<a href="mailto:haley@ucar.edu" target="_blank">haley@ucar.edu</a>></span>:<br>
<blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><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 "=" 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 "error_bars" and "centers" as "id" arrays. But, these are defined inside of a larger loop across "i", and so every time you go through another iteration of "i", 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 "plot", and make sure this dummy attribute has a unique name every time. Here'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 = "centers" + 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 = "error_bar" + 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:'courier new',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"><div><div class="h5">On Mon, Jul 21, 2014 at 11:52 AM, Guilherme Martins <span dir="ltr"><<a href="mailto:jgmsantos@gmail.com" target="_blank">jgmsantos@gmail.com</a>></span> wrote:<br>
</div></div><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><div><div class="h5"><div dir="ltr">Hi all,<div><br></div><div>I'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'm using NCL 6.2.0. My files are in attached.</div><span><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></div></div>_______________________________________________<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>
</blockquote></div><br><br clear="all"><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>