<html>
  <head>
    <meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
  </head>
  <body text="#000000" bgcolor="#FFFFFF">
    Hi DP,<br>
    <br>
    if you read the following two examples pages you should be able to
    read and plot your ASCII file.<br>
    <br>
    See xy-plots example page: <a class="moz-txt-link-freetext" href="http://ncl.ucar.edu/Applications/xy.shtml">http://ncl.ucar.edu/Applications/xy.shtml</a><br>
    See Read ASCII: <a class="moz-txt-link-freetext" href="http://ncl.ucar.edu/Applications/read_ascii.shtml">http://ncl.ucar.edu/Applications/read_ascii.shtml</a><br>
    <br>
    But here is a short script to do it:<br>
    <br>
    <font color="#3333ff"><tt>  fname = "tst1.txt"</tt><tt><br>
      </tt><tt><br>
      </tt><tt>  nrow     = numAsciiRow(fname)</tt><tt><br>
      </tt><tt>  data     = asciiread(fname,-1,"string")</tt><tt><br>
      </tt><tt>  date     = str_get_field(data(1:),1,"    ")</tt><tt><br>
      </tt><tt>  pressure = toint(str_get_field(data(1:),2,"    "))</tt><tt><br>
      </tt><tt>  wind     = toint(str_get_field(data(1:),3,"    "))</tt><tt><br>
      </tt><tt><br>
      </tt><tt>  idate = ispan(0,dimsizes(date)-1,1)</tt><tt><br>
      </tt><tt>  </tt><tt><br>
      </tt><tt>  wks = gsn_open_wks("x11","plot_tst1")</tt><tt><br>
      </tt><tt>  </tt><tt><br>
      </tt><tt>  res                 = True</tt><tt><br>
      </tt><tt>  res@trXMinF         = idate(0)</tt><tt><br>
      </tt><tt>  res@trXMaxF         = idate(nrow-2)</tt><tt><br>
      </tt><tt>  res@trYMinF         = -100</tt><tt><br>
      </tt><tt>  res@trYMaxF         = max(pressure)+100</tt><tt><br>
      </tt><tt>  res@tmXBMode        = "Explicit"</tt><tt><br>
      </tt><tt>  res@tmXBValues      = idate</tt><tt><br>
      </tt><tt>  res@tmXBLabels      = date</tt><tt><br>
      </tt><tt>  res@tmXBLabelAngleF = 45</tt><tt><br>
      </tt><tt></tt><tt><br>
      </tt><tt>  plot = gsn_csm_xy(wks,idate,(/pressure,wind/),res)</tt></font><br>
    <br>
    -Karin<br>
    <br>
    <div class="moz-cite-prefix">Am 28.10.19 um 13:06 schrieb Debashis
      Paul via ncl-talk:<br>
    </div>
    <blockquote type="cite"
cite="mid:CAFV8iJ+0pnihpn3FsibQzBKbYmr=jZ5TAV9Pu4SWxrFxvMQNxw@mail.gmail.com">
      <meta http-equiv="content-type" content="text/html; charset=UTF-8">
      <div dir="ltr">
        <div class="gmail_default"
          style="font-family:monospace,monospace">Hello NCL community, I
          have a text file containing date minimum pressure and wind
          speed, which I need to plot as an XY plot with the two
          variables with time as the x-axis. I tried according to the
          examples given in NCL examples but am not able to produce it.
          So if anyone can help me in this regard I will be much
          grateful.</div>
        <div class="gmail_default"
          style="font-family:monospace,monospace"> The text file will be
          attached to this email.</div>
        <div class="gmail_default"
          style="font-family:monospace,monospace"><br>
        </div>
        <div class="gmail_default"
          style="font-family:monospace,monospace">With regards,</div>
        <div class="gmail_default"
          style="font-family:monospace,monospace">DP</div>
        <div class="gmail_default"
          style="font-family:monospace,monospace">******************************************************************</div>
        <div>
          <div dir="ltr" class="gmail_signature"
            data-smartmail="gmail_signature">
            <div dir="ltr">
              <div>
                <div dir="ltr">
                  <div>
                    <div dir="ltr"><b><i><font face="monospace"
                            color="#0000ff">Debashis Paul</font></i></b></div>
                    <div dir="ltr"><b><i><font face="monospace"
                            color="#0000ff">Research Scholar,NIT-RKL<br>
                          </font></i></b>
                      <div><b><i><font face="monospace" color="#0000ff">Ph:+916002713628</font></i></b></div>
                      <div><b><i><font face="monospace" color="#0000ff">E-mail:
                              <a href="mailto:Debgeo668@gmail.com"
                                target="_blank" moz-do-not-send="true">Debgeo668@gmail.com</a></font></i></b></div>
                    </div>
                  </div>
                </div>
              </div>
            </div>
          </div>
        </div>
      </div>
      <br>
      <fieldset class="mimeAttachmentHeader"></fieldset>
      <pre class="moz-quote-pre" wrap="">_______________________________________________
ncl-talk mailing list
<a class="moz-txt-link-abbreviated" href="mailto:ncl-talk@ucar.edu">ncl-talk@ucar.edu</a>
List instructions, subscriber options, unsubscribe:
<a class="moz-txt-link-freetext" href="http://mailman.ucar.edu/mailman/listinfo/ncl-talk">http://mailman.ucar.edu/mailman/listinfo/ncl-talk</a></pre>
    </blockquote>
    <br>
  </body>
</html>