<div dir="ltr"><div>Ally,<br>Whatever data you're using, the array called 'ts' doesn'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"><<a href="mailto:allytoure@gmail.com" target="_blank">allytoure@gmail.com</a>></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> 'ts' 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>'open model.ctl'<br><br>* pick a variable and an area, in this case surface temperature in central US<br>var = 'ts'<br>minlat='30'<br>maxlat='50'<br>minlon='-110'<br>maxlon='-80'<br>tlast=5<br><br>* define variables: mean, plus 1 stddev, minus 1 stddev, min, max, <br>'set x 1'<br>'set y 1'<br>'set t 1 'tlast<br>'define mean = tloop(aave('var',lon='minlon',<wbr>lon='maxlon',lat='minlat',lat=<wbr>'maxlat'))'<br>'define pstd = mean + tloop(aave(sqrt(pow('var'-<wbr>mean,2)),lon='minlon',lon='<wbr>maxlon',lat='minlat',lat='<wbr>maxlat'))'<br>'define mstd = mean - tloop(aave(sqrt(pow('var'-<wbr>mean,2)),lon='minlon',lon='<wbr>maxlon',lat='minlat',lat='<wbr>maxlat'))'<br>'define vmax = tloop(max(max('var',lon='<wbr>minlon',lon='maxlon'),lat='<wbr>minlat',lat='maxlat'))'<br>'define vmin = tloop(min(min('var',lon='<wbr>minlon',lon='maxlon'),lat='<wbr>minlat',lat='maxlat'))'<br><br>* set up the plot <br>'clear'<br>'set vrange 260 300'<br>'set t 0.5 'tlast+0.5<br><br>* draw bars centered on the mean, spanning the range from plus/minus 1 standard deviaton <br>'set gxout bar'<br>'set bargap 50'<br>'set baropts outline'<br>'d mstd;pstd'<br><br>* draw error bars spanning the range from the min/max values<br>'set gxout errbar'<br>'d vmin;vmax'<br><br>* draw yellow line showing the mean values<br>'set gxout line'<br>'set cmark 0'<br>'set cthick 6'<br>'d mean'<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"><<a href="mailto:allytoure@gmail.com" target="_blank">allytoure@gmail.com</a>></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"><<a href="mailto:jeffduda319@gmail.com" target="_blank">jeffduda319@gmail.com</a>></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'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 "q file" 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 "run" 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'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"><<a href="mailto:allytoure@gmail.com" target="_blank">allytoure@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="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='1 2 3 4 5 6 7 8 9 10' </span></i><br><i><span style="font-size:x-small">yarray='1 2 3 4 5 6 7 8 9 10' </span></i><br><i><span style="font-size:x-small">'scatter -x 'xarray' -y '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>