<html><head></head><body style="word-wrap: break-word; -webkit-nbsp-mode: space; -webkit-line-break: after-white-space; ">Hi, Mason -- <div>In GrADS, it is best to think of color 0 as background, and color 1 as foreground. Whether 0 and 1 correspond to black or white depends on other commands, including 'set display' and 'set background'. The 'clear' command covers the screen with whatever the background color is. The default setting is background == black and foreground == white. The command 'set display color white' will reset the colors that go with 0 and 1, but will not redraw the background, so that is why you always follow that with a 'clear' command. The 'set display' command sets background and foreground properly, but 'set background' only changes the background color -- I think this command was intended for changing the color of the little rectangles that are drawn behind contour labels to make them more readable. Try set 'background 2' and 'clear' and 'd tmpprs', and you'll see how these things interact. Think of the 'set annot' command as the equivalent of 'set foreground', and add that to the mix to see how it changes the display. I hope that helps clarify things. </div><div><br></div><div>In your original script, if you remove the 'set background 1' , move the 'clear' below 'set display color white', and move those two commands above the while loop, it should work the way you expect. </div><div><br></div><div>Also, to really confuse you, there is a a 'feature' in version 2.0 that the if you use 'set background', it is not reset to the default color on 'reinit'. This is fixed in version 2.1. I would avoid using 'set backround' and stick with 'set display' which is more completely implemented. </div><div><br></div><div>--Jennifer</div><div><br></div><div><br></div><div><br><div><div>On Nov 9, 2011, at 5:11 PM, Rowell, Mason D. wrote:</div><br class="Apple-interchange-newline"><blockquote type="cite"><span class="Apple-style-span" style="border-collapse: separate; font-family: Helvetica; font-style: normal; font-variant: normal; font-weight: normal; letter-spacing: normal; line-height: normal; orphans: 2; text-align: -webkit-auto; text-indent: 0px; text-transform: none; white-space: normal; widows: 2; word-spacing: 0px; -webkit-border-horizontal-spacing: 0px; -webkit-border-vertical-spacing: 0px; -webkit-text-decorations-in-effect: none; -webkit-text-size-adjust: auto; -webkit-text-stroke-width: 0px; font-size: medium; "><div ocsi="0" fpstyle="1"><div style="direction: ltr; font-family: Tahoma; color: rgb(0, 0, 0); font-size: 10pt; ">Jeff,<br><br>I don't know if I have tried this placement yet so I'll give it a whirl. Unless I am going crazy though, I don't see the geopoten. lines, despite the fact ccolor is at 0, which should be black. If I can't see them, I assume it is making them white, and I don't know why.<br><br>Mason<span class="Apple-converted-space"> </span><br><div style="font-family: 'Times New Roman'; color: rgb(0, 0, 0); font-size: 16px; "><hr tabindex="-1"><div id="divRpF746799" style="direction: ltr; "><font color="#000000" size="2" face="Tahoma"><b>From:</b><span class="Apple-converted-space"> </span><a href="mailto:gradsusr-bounces@gradsusr.org">gradsusr-bounces@gradsusr.org</a><span class="Apple-converted-space"> </span>[<a href="mailto:gradsusr-bounces@gradsusr.org">gradsusr-bounces@gradsusr.org</a>] on behalf of Jeffrey Duda [<a href="mailto:jdduda@iastate.edu">jdduda@iastate.edu</a>]<br><b>Sent:</b><span class="Apple-converted-space"> </span>Wednesday, November 09, 2011 3:14 PM<br><b>To:</b><span class="Apple-converted-space"> </span>GrADS Users Forum<br><b>Subject:</b><span class="Apple-converted-space"> </span>Re: [gradsusr] Background options failing<br></font><br></div><div></div><div>Mason,<br>Okay, I put your script to work on a different computer system and got the results you're looking for (I think, see attached image). Here's the code that got those results:<br><br>'open narr-a_221_19981218_0000_000.ctl'<br>hgt = 850<br>'set lev 'hgt<br>'set lat 34 46'<br>'set lon -114 -97'<br>'set mpdset hires'<br>'set display color white'<br>'clear'<br>tt = 1<br>while (tt <= 8)<br> 'set t 'tt<br> 'set cint 10'<br> 'set ccolor 0'<br> 'd HGTprs'<br> 'set clab %.0f`3.`1C'<br> 'set cint 2'<br> 'set cstyle 2'<br> 'set ccolor 2'<br> 'd (TMPprs - 273)'<br> 'set gxout barb'<br> 'd skip(UGRDprs,3,3);VGRDprs;mag(UGRDprs,VGRDprs)'<br> 'printim example_'tt'_'hgt'.png x800 y600'<br> 'clear'<br> tt = tt + 1<br>endwhile<br><br>You'll notice the only things I changed (other than the path to the files) is where I put some of the setup commands, and that I removed the "set background" command. You don't need to use both "set background" and "set display" to get what you want. In fact, I think those two commands sort of canceled each other out. I would suggest always going with the "set display color white" ; "clear" sequence. Changing either the background or display color messes with the color that represents the "foreground" and "background". When you did "set background 1", you told Grads to set the color index 1 to black and 0 to white instead of the other way around, which is the default behavior. I don't know if it matters to get much deeper than that, but just use the suggestion I provided and you'll be fine.<br><br>Jeff<br><br><div class="gmail_quote">On Wed, Nov 9, 2011 at 2:20 PM, Rowell, Mason D.<span class="Apple-converted-space"> </span><span dir="ltr"><<a href="mailto:Mason.D.Rowell-1@ou.edu" target="_blank">Mason.D.Rowell-1@ou.edu</a>></span><span class="Apple-converted-space"> </span>wrote:<br><blockquote class="gmail_quote" style="margin-top: 0pt; margin-right: 0pt; margin-bottom: 0pt; margin-left: 0.8ex; border-left-width: 1px; border-left-style: solid; border-left-color: rgb(204, 204, 204); padding-left: 1ex; ">All,<br><br>I reduced the iterations to one, and I still cannot get these commands in the script to do the same thing when typing them one by one on the command line with a refresh load of grads. Has anyone had this happen before? Could someone run my script and tell me if you still only get a black background, despite the command?<br><br>Mason<br>________________________________________<br>From:<span class="Apple-converted-space"> </span><a href="mailto:gradsusr-bounces@gradsusr.org" target="_blank">gradsusr-bounces@gradsusr.org</a><span class="Apple-converted-space"> </span>[<a href="mailto:gradsusr-bounces@gradsusr.org" target="_blank">gradsusr-bounces@gradsusr.org</a>] on behalf of Rowell, Mason D. [<a href="mailto:Mason.D.Rowell-1@ou.edu" target="_blank">Mason.D.Rowell-1@ou.edu</a>]<br>Sent: Wednesday, November 09, 2011 1:31 PM<br><div class="HOEnZb"><div class="h5">To: GrADS Users Forum<br>Subject: Re: [gradsusr] Background options failing<br><br>All,<br><br>Absolutely nothing will work. Even if I use white in printim the image is STILL black. This is such a huge waste of time at this point. Should it be so hard to get a script to work right?<br><br>Mason<br>________________________________________<br>From:<span class="Apple-converted-space"> </span><a href="mailto:gradsusr-bounces@gradsusr.org" target="_blank">gradsusr-bounces@gradsusr.org</a><span class="Apple-converted-space"> </span>[<a href="mailto:gradsusr-bounces@gradsusr.org" target="_blank">gradsusr-bounces@gradsusr.org</a>] on behalf of Nick Heath [<a href="mailto:nkh09@fsu.edu" target="_blank">nkh09@fsu.edu</a>]<br>Sent: Wednesday, November 09, 2011 12:51 PM<br>To: GrADS Users Forum<br>Subject: Re: [gradsusr] Background options failing<br><br>Try moving your 'clear' command to the line after you 'set display color white', e.g.,<br><br>'set background 1'<br>'set display color white'<br>'clear'<br><br>That might work.<br><br>-Nick<br><br>----- Original Message -----<br>From: "Rowell, Mason D." <<a href="mailto:Mason.D.Rowell-1@ou.edu" target="_blank">Mason.D.Rowell-1@ou.edu</a>><br>Date: Wednesday, November 9, 2011 6:17 pm<br>Subject: [gradsusr] Background options failing<br>To: "<a href="mailto:gradsusr@gradsusr.org" target="_blank">gradsusr@gradsusr.org</a>" <<a href="mailto:gradsusr@gradsusr.org" target="_blank">gradsusr@gradsusr.org</a>><br><br>> All,<br>><br>> See the below. I cannot get the script to do the same as the<br>> command line operations, even when they are the same.<br>><br>> Mason<br>> ________________________________________<br>> From: Rowell, Mason D.<br>> Sent: Tuesday, November 08, 2011 4:17 PM<br>> To:<span class="Apple-converted-space"> </span><a href="mailto:gradsusr@gradsusr.org" target="_blank">gradsusr@gradsusr.org</a><br>> Subject:<br>><br>> All,<br>><br>> Running the above, command by command, gives me white background,<br>> with grey political boundaries and a black frame, but running the<br>> script, gives me orange boundaries and black background (with white<br>> frame). This is a complete mystery to me. In fact, I often have to<br>> completely close out of grads and reopen from scratch in order to<br>> get 'set background 1' to work from the command line (which only<br>> shows after using clear). So I would expect at least the first<br>> image from the script to look right but it doesn't. Anyone know why<br>> grads is needing a fresh start to change this, ALONG with a clear,<br>> then never to work properly again unless I reboot it? This can't be<br>> the only problem with the script since it won't even work right for<br>> the first image running the script with a fresh grads<br>> session....Again I am using an older 2.0 version 6.<br>><br>> Mason<br>><br><br><br><br><br><br><br><br>Nick Heath<br>Graduate Student<br>Florida State University<br>Department of Earth, Ocean, and Atmospheric Science<br>Love Bldg. Rm 311<br>_______________________________________________<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" target="_blank">http://gradsusr.org/mailman/listinfo/gradsusr</a><br><br>_______________________________________________<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" target="_blank">http://gradsusr.org/mailman/listinfo/gradsusr</a><br><br>_______________________________________________<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" target="_blank">http://gradsusr.org/mailman/listinfo/gradsusr</a><br></div></div></blockquote></div><br><br clear="all"><br>--<span class="Apple-converted-space"> </span><br>Jeff Duda<br>Iowa State University<br>Meteorology Graduate Student<br><a href="http://www.meteor.iastate.edu/%7Ejdduda" target="_blank">www.meteor.iastate.edu/~jdduda</a><br></div></div></div>_______________________________________________<br>gradsusr mailing list<br><a href="mailto:gradsusr@gradsusr.org">gradsusr@gradsusr.org</a><br><a href="http://gradsusr.org/mailman/listinfo/gradsusr">http://gradsusr.org/mailman/listinfo/gradsusr</a><br></div></span></blockquote></div><br><div apple-content-edited="true">
<span class="Apple-style-span" style="border-collapse: separate; border-spacing: 0px 0px; color: rgb(0, 0, 0); font-family: Helvetica; font-size: 12px; font-style: normal; font-variant: normal; font-weight: normal; letter-spacing: normal; line-height: normal; text-align: auto; -khtml-text-decorations-in-effect: none; text-indent: 0px; -apple-text-size-adjust: auto; text-transform: none; orphans: 2; white-space: normal; widows: 2; word-spacing: 0px; "><span class="Apple-style-span" style="border-collapse: separate; border-spacing: 0px 0px; color: rgb(0, 0, 0); font-family: Helvetica; font-size: 12px; font-style: normal; font-variant: normal; font-weight: normal; letter-spacing: normal; line-height: normal; text-align: auto; -khtml-text-decorations-in-effect: none; text-indent: 0px; -apple-text-size-adjust: auto; text-transform: none; orphans: 2; white-space: normal; widows: 2; word-spacing: 0px; "><span class="Apple-style-span" style="border-collapse: separate; border-spacing: 0px 0px; color: rgb(0, 0, 0); font-family: Helvetica; font-size: 12px; font-style: normal; font-variant: normal; font-weight: normal; letter-spacing: normal; line-height: normal; text-align: auto; -khtml-text-decorations-in-effect: none; text-indent: 0px; -apple-text-size-adjust: auto; text-transform: none; orphans: 2; white-space: normal; widows: 2; word-spacing: 0px; "><div>--</div><div>Jennifer M. Adams</div><div>IGES/COLA</div><div>4041 Powder Mill Road, Suite 302</div><div>Calverton, MD 20705</div><div><a href="mailto:jma@cola.iges.org">jma@cola.iges.org</a></div><div><br class="khtml-block-placeholder"></div><br class="Apple-interchange-newline"></span></span></span>
</div>
<br></div></body></html>