<html>
  <head>
    <meta content="text/html; charset=UTF-8" http-equiv="Content-Type">
  </head>
  <body bgcolor="#FFFFFF" text="#000000">
    Hi Ryne,<br>
    <br>
    I think you need the "lag =" in each conditional, e.g., <br>
    <br>
    if ( lag = 1 | lag = 5 | lag = 9 | lag = 13 )<br>
    <br>
    Jim<br>
    <br>
    <div class="moz-cite-prefix">On 6/16/15 11:06 AM, Noska, Ryne wrote:<br>
    </div>
    <blockquote
cite="mid:SN2PR0501MB106989D8D515B0EB8FC3E243E7A70@SN2PR0501MB1069.namprd05.prod.outlook.com"
      type="cite">
      <meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
      <style type="text/css" style="display:none;"><!-- P {margin-top:0;margin-bottom:0;} --></style>
      <div id="divtagdefaultwrapper"
style="font-size:12pt;color:#000000;background-color:#FFFFFF;font-family:Calibri,Arial,Helvetica,sans-serif;">
        <div autoid="_rp_2" role="list" tabindex="-1"
          aria-label="Conversation" style="font-family:
          wf_segoe-ui_normal, 'Segoe UI', 'Segoe WP', Tahoma, Arial,
          sans-serif; background-color: rgb(255, 255, 255);">
          <div tabindex="-1">
            <div autoid="_rp_3" aria-label="Message Contents"
              role="listitem" tabindex="0" aria-selected="true">
              <div class="_rp_v4" tabindex="-1" aria-label="Expanded
                Message Contents" style="min-width: 350px; clear: both;">
                <div tabindex="-1" autoid="_rp_H" class="_rp_e4
                  ms-border-color-neutralLight
                  ShowReferenceAttachmentsLinks" style="min-height:
                  70px; border-bottom-width: 1px; border-bottom-style:
                  solid; padding-bottom: 30px; position: relative;">
                  <div class="_rp_r4">
                    <div role="region">
                      <div autoid="_rp_L" class="_rp_h4"
                        id="Item.MessagePartBody" style="clear: both;
                        position: relative; top: -5px; width: auto;
                        padding-top: 12px; word-wrap: break-word;">
                        <div class="_rp_i4 ms-font-weight-regular
                          ms-font-color-neutralDark rpHighlightAllClass
                          rpHighlightBodyClass"
                          id="Item.MessageUniqueBody" tabindex="0"
                          style="font-size: 15px; outline: none;">
                          <div dir="ltr"><span dir="ltr">
                              <div id="divtagdefaultwrapper"><font
                                  color="black"
                                  face="Calibri,Arial,Helvetica,sans-serif"
                                  size="3"><span style="font-size:
                                    12pt;">
                                    <div style="margin-top: 0px;
                                      margin-bottom: 0px;">I have
                                      written a very simple code for the
                                      purpose of creating one image with
                                      sixteen figures (four rows and
                                      four columns). Unfortunately, the
                                      loop I have designed to change the
                                      location of the next figure is
                                      broken. Instead of only executing
                                      the "if" statement if lag = 1 or 5
                                      or 9 or 13, this portion of the
                                      loop is ALWAYS executed. The
                                      "else" statement is NEVER
                                      executed, <font
                                        face="Calibri,Arial,Helvetica,sans-serif"
                                        size="2"><span style="font-size:
                                          16px;">causing the figures to
                                          run off the page after figure
                                          4 since only ymin and ymax
                                          change. Below is a portion of
                                          my code; again, the
                                          problematic portion is the IF
                                          loop:</span></font><br>
                                    </div>
                                    <div style="margin-top: 0px;
                                      margin-bottom: 0px;"><font
                                        face="Calibri,Arial,Helvetica,sans-serif"
                                        size="2"><span style="font-size:
                                          16px;"><br>
                                        </span></font></div>
                                    <div style="margin-top: 0px;
                                      margin-bottom: 0px;"><font
                                        face="Calibri,Arial,Helvetica,sans-serif"
                                        size="2"><span style="font-size:
                                          16px;">---------------------------------------</span></font></div>
                                    <div style="margin-top: 0px;
                                      margin-bottom: 0px;"><font
                                        face="Calibri,Arial,Helvetica,sans-serif"
                                        size="2"><span style="font-size:
                                          16px;"><br>
                                        </span></font></div>
                                    <div>
                                      <div>xmin = 0.25</div>
                                      <div>xmax = 2.50</div>
                                      <div>ymin = 6.25 + 2.00</div>
                                      <div>ymax = 8.00 + 2.00</div>
                                      <div><br>
                                      </div>
                                      <div>lag = 1</div>
                                      <div>while (lag &lt;= 16)</div>
                                      <div>  numlag = lag - 1</div>
                                      <div><br>
                                      </div>
                                      <div> <strong> if (lag = 1 | 5 | 9
                                          | 13)</strong></div>
                                      <div><strong>    xmin = 0.25</strong></div>
                                      <div><strong>    xmax = 2.50</strong></div>
                                      <div><strong>    ymin = ymin -
                                          2.00</strong></div>
                                      <div><strong>    ymax = ymax -
                                          2.00</strong></div>
                                      <div><strong>  else </strong></div>
                                      <div><strong>    xmin = xmin +
                                          2.50</strong></div>
                                      <div><strong>    xmax = xmax +
                                          2.50</strong></div>
                                      <div><strong>  endif</strong></div>
                                      <div><br>
                                      </div>
                                      <div>  xlab = ((xmax - xmin)/2) +
                                        0.25</div>
                                      <div>  ylab = ymax + 0.125<br>
                                      </div>
                                      <div><br>
                                      </div>
                                      <div>  'set parea 'xmin' 'xmax'
                                        'ymin' 'ymax</div>
                                      <div>  'set xlopts 1 1 0.10'</div>
                                      <div>  'set ylopts 1 1 0.10'</div>
                                      <div>  'set xlint 10'</div>
                                      <div>  'set ylint 10'</div>
                                      <div>  'set xlab off'</div>
                                      <div>  'set ylab off'</div>
                                      <div>  'set grid on'</div>
                                      <div>  'set grads off'</div>
                                      <div>  'set map 1 1 5'</div>
                                      <div>  'set clevs -0.8 -0.7 -0.6
                                        -0.5 -0.4 -0.3 -0.2 -0.1 0.1 0.2
                                        0.3'</div>
                                      <div>  'set ccols 9   14   4    11
                                          5   13    3    10   0   7  12
                                         8'</div>
                                      <div>  'set t 'lag</div>
                                      <div>  'd corr_grdons'</div>
                                      <div>  'set strsiz 0.15'</div>
                                      <div>  'set string 1 c 8'</div>
                                      <div>  'draw string 'xlab' 'ylab'
                                        lag='numlag'days'</div>
                                      <div><br>
                                      </div>
                                      <div>  lag = lag + 1</div>
                                      <div>endwhile<br>
                                      </div>
                                      <br>
                                    </div>
                                    <div>-------------------------------<br>
                                    </div>
                                    <div><br>
                                    </div>
                                    <div>Any suggestions?<br>
                                    </div>
                                    <div><br>
                                    </div>
                                    <div>Thank you,<br>
                                    </div>
                                    <div>Ryne<br>
                                    </div>
                                    <div><br>
                                    </div>
                                  </span></font></div>
                            </span></div>
                        </div>
                      </div>
                    </div>
                    <div class="_rp_l4" style="clear: both;">​<br>
                    </div>
                  </div>
                </div>
              </div>
            </div>
          </div>
        </div>
        <p><br>
        </p>
      </div>
      <br>
      <fieldset class="mimeAttachmentHeader"></fieldset>
      <br>
      <pre wrap="">_______________________________________________
gradsusr mailing list
<a class="moz-txt-link-abbreviated" href="mailto:gradsusr@gradsusr.org">gradsusr@gradsusr.org</a>
<a class="moz-txt-link-freetext" href="http://gradsusr.org/mailman/listinfo/gradsusr">http://gradsusr.org/mailman/listinfo/gradsusr</a>
</pre>
    </blockquote>
    <br>
  </body>
</html>