<div dir="ltr"><div>Ally,<br>Whatever data you&#39;re using, the array called &#39;ts&#39; doesn&#39;t exist in it. Make sure you replace variable entries in scripts like that with data that actually exists in your data file.<br><br></div>Jeff<br></div><div class="gmail_extra"><br><div class="gmail_quote">On Thu, Dec 15, 2016 at 2:18 PM, Ally Toure <span dir="ltr">&lt;<a href="mailto:allytoure@gmail.com" target="_blank">allytoure@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"><div><div><div><div><div><div><div>Hi Jeff,<br></div>I managed to make the script work thanks again for your help<br><br></div>I got the script below <br></div>at <a href="ftp://cola.gmu.edu/grads/scripts/box_and_whisker.gs" target="_blank">ftp://cola.gmu.edu/grads/<wbr>scripts/box_and_whisker.gs</a><br><br></div>when I try to run it I am getting the error message:<br>Syntax Error:  Invalid Operand <br>  &#39;ts&#39; not a variable or function name<br><br></div>and not sure what I am missing.<br></div>Thanks<br></div>Ally<br><div><div><div><div><br><br><br><br>* Demonstrates how to use gxout bar and errbar to draw a box and whisker plot<br><br>&#39;open model.ctl&#39;<br><br>* pick a variable and an area, in this case surface temperature in central US<br>var = &#39;ts&#39;<br>minlat=&#39;30&#39;<br>maxlat=&#39;50&#39;<br>minlon=&#39;-110&#39;<br>maxlon=&#39;-80&#39;<br>tlast=5<br><br>* define variables: mean, plus 1 stddev, minus 1 stddev, min, max, <br>&#39;set x 1&#39;<br>&#39;set y 1&#39;<br>&#39;set t 1 &#39;tlast<br>&#39;define mean = tloop(aave(&#39;var&#39;,lon=&#39;minlon&#39;,<wbr>lon=&#39;maxlon&#39;,lat=&#39;minlat&#39;,lat=<wbr>&#39;maxlat&#39;))&#39;<br>&#39;define pstd = mean + tloop(aave(sqrt(pow(&#39;var&#39;-<wbr>mean,2)),lon=&#39;minlon&#39;,lon=&#39;<wbr>maxlon&#39;,lat=&#39;minlat&#39;,lat=&#39;<wbr>maxlat&#39;))&#39;<br>&#39;define mstd = mean - tloop(aave(sqrt(pow(&#39;var&#39;-<wbr>mean,2)),lon=&#39;minlon&#39;,lon=&#39;<wbr>maxlon&#39;,lat=&#39;minlat&#39;,lat=&#39;<wbr>maxlat&#39;))&#39;<br>&#39;define vmax = tloop(max(max(&#39;var&#39;,lon=&#39;<wbr>minlon&#39;,lon=&#39;maxlon&#39;),lat=&#39;<wbr>minlat&#39;,lat=&#39;maxlat&#39;))&#39;<br>&#39;define vmin = tloop(min(min(&#39;var&#39;,lon=&#39;<wbr>minlon&#39;,lon=&#39;maxlon&#39;),lat=&#39;<wbr>minlat&#39;,lat=&#39;maxlat&#39;))&#39;<br><br>* set up the plot <br>&#39;clear&#39;<br>&#39;set vrange 260 300&#39;<br>&#39;set t 0.5 &#39;tlast+0.5<br><br>* draw bars centered on the mean, spanning the range from plus/minus 1 standard deviaton <br>&#39;set gxout bar&#39;<br>&#39;set bargap 50&#39;<br>&#39;set baropts outline&#39;<br>&#39;d mstd;pstd&#39;<br><br>* draw error bars spanning the range from the min/max values<br>&#39;set gxout errbar&#39;<br>&#39;d vmin;vmax&#39;<br><br>* draw yellow line showing the mean values<br>&#39;set gxout line&#39;<br>&#39;set cmark 0&#39;<br>&#39;set cthick 6&#39;<br>&#39;d mean&#39;<br><br><br><br></div></div></div></div></div><div class="gmail_extra"><br><div class="gmail_quote">On Thu, Dec 15, 2016 at 2:40 PM, Ally Toure <span dir="ltr">&lt;<a href="mailto:allytoure@gmail.com" target="_blank">allytoure@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"><div>Jeff,<br>Thanks so much. I appreciate your help.<span class="m_-7253914323470415741HOEnZb"><font color="#888888"><br></font></span></div><span class="m_-7253914323470415741HOEnZb"><font color="#888888">Ally<br></font></span></div><div class="m_-7253914323470415741HOEnZb"><div class="m_-7253914323470415741h5"><div class="gmail_extra"><br><div class="gmail_quote">On Thu, Dec 15, 2016 at 2:02 PM, Jeff Duda <span dir="ltr">&lt;<a href="mailto:jeffduda319@gmail.com" target="_blank">jeffduda319@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"><div><div><div><div><div><div><div>Ally,<br><br>The example you link to is a script that makes a scatter plot. You don&#39;t need a script to make a scatter plot, although the <a href="http://scatter.gs" target="_blank">scatter.gs</a> script probably makes a nicer looking plot than the simple way, detailed as follows:<br><br></div>Without a script, you can make a scatter plot as simply as entering<br><br></div>set gxout scatter<br></div>d field1;field2<br><br></div>where field1 and field2 are arrays in your data file (you can see a list of arrays by typing &quot;q file&quot; at the command prompt or by looking in your control file). There are numerous other commands you can use to adjust the look of the resulting plot, including set vrange/vrange2 to adjust the x-/y-axis limits, digsize to control the size of the markers, and perhaps cmark to control the type of mark plotted.<br><br></div>Regarding the link, you have to download the script code on that website. Then, once grads is running, you need to type &quot;run&quot; before the script name and arguments. Also, make sure to include the full pathname of the script code unless you have set the environmental variable GASCRP to the location of your script code. Then you don&#39;t have to include the full path.<br><br></div>Good luck.<br><br></div>Jeff Duda<br></div><div class="gmail_extra"><br><div class="gmail_quote"><div><div class="m_-7253914323470415741m_-7964890212461876799h5">On Thu, Dec 15, 2016 at 12:52 PM, Ally Toure <span dir="ltr">&lt;<a href="mailto:allytoure@gmail.com" target="_blank">allytoure@gmail.com</a>&gt;</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="m_-7253914323470415741m_-7964890212461876799h5"><div dir="ltr"><div><div>Hi All,<br></div>I am a new grads user. I am trying to make a scatter plot.<br></div><div>I found an example <br></div><div>here<br><a href="http://gradsaddict.blogspot.com/2013/07/script-scattergs-easily-create-scatter.html" target="_blank">http://gradsaddict.blogspot.co<wbr>m/2013/07/script-scattergs-eas<wbr>ily-create-scatter.html</a><br></div><div>when I try to run the following commands<br><i><span style="font-size:x-small">xarray=&#39;1 2 3 4 5 6 7 8 9 10&#39; </span></i><br><i><span style="font-size:x-small">yarray=&#39;1 2 3 4 5 6 7 8 9 10&#39; </span></i><br><i><span style="font-size:x-small">&#39;scatter -x &#39;xarray&#39; -y &#39;yarray <br><br><br></span></i></div><div><i><span style="font-size:x-small"><font size="2">I </font></span></i><span style="font-size:x-small"><font size="2">was getting the following error message:<br><br>Unknown command: scatter<br><br></font></span></div><div><span style="font-size:x-small"><font size="2">Could someone tell me what I am missing.<br><br></font></span></div><div><span style="font-size:x-small"><font size="2">Thanks<span class="m_-7253914323470415741m_-7964890212461876799m_-8720529502650840285HOEnZb"><font color="#888888"><br></font></span></font></span></div><span class="m_-7253914323470415741m_-7964890212461876799m_-8720529502650840285HOEnZb"><font color="#888888"><div><span style="font-size:x-small"><font size="2">Ally<br></font></span></div></font></span></div>
<br></div></div>______________________________<wbr>_________________<br>
gradsusr mailing list<br>
<a href="mailto:gradsusr@gradsusr.org" target="_blank">gradsusr@gradsusr.org</a><br>
<a href="http://gradsusr.org/mailman/listinfo/gradsusr" rel="noreferrer" target="_blank">http://gradsusr.org/mailman/li<wbr>stinfo/gradsusr</a><br>
<br></blockquote></div><span class="m_-7253914323470415741m_-7964890212461876799HOEnZb"><font color="#888888"><br><br clear="all"><span class="HOEnZb"><font color="#888888"><br>-- <br><div class="m_-7253914323470415741m_-7964890212461876799m_-8720529502650840285gmail_signature" data-smartmail="gmail_signature"><div dir="ltr"><div><div dir="ltr"><div>Jeff Duda<br>Post-doctoral research fellow<br>University of Oklahoma School of Meteorology<br></div></div></div></div></div>
</font></span></font></span></div><span class="HOEnZb"><font color="#888888">
<br>______________________________<wbr>_________________<br>
gradsusr mailing list<br>
<a href="mailto:gradsusr@gradsusr.org" target="_blank">gradsusr@gradsusr.org</a><br>
<a href="http://gradsusr.org/mailman/listinfo/gradsusr" rel="noreferrer" target="_blank">http://gradsusr.org/mailman/li<wbr>stinfo/gradsusr</a><br>
<br></font></span></blockquote></div><span class="HOEnZb"><font color="#888888"><br></font></span></div>
</div></div></blockquote></div><br></div>
<br>______________________________<wbr>_________________<br>
gradsusr mailing list<br>
<a href="mailto:gradsusr@gradsusr.org">gradsusr@gradsusr.org</a><br>
<a href="http://gradsusr.org/mailman/listinfo/gradsusr" rel="noreferrer" target="_blank">http://gradsusr.org/mailman/<wbr>listinfo/gradsusr</a><br>
<br></blockquote></div><br><br clear="all"><br>-- <br><div class="gmail_signature" data-smartmail="gmail_signature"><div dir="ltr"><div><div dir="ltr"><div>Jeff Duda<br>Post-doctoral research fellow<br>University of Oklahoma School of Meteorology<br></div></div></div></div></div>
</div>