<html>
  <head>
    <meta content="text/html; charset=ISO-8859-1"
      http-equiv="Content-Type">
  </head>
  <body bgcolor="#FFFFFF" text="#000000">
    Hi Kunal,<br>
    <br>
    you defined variable x to float, change it to integer.<br>
    <br>
    Bye,<br>
    Karin<br>
    <br>
    <div class="moz-cite-prefix">Am 26.09.14 14:16, schrieb Kunal Bali:<br>
    </div>
    <blockquote
cite="mid:CAOiHCtTHNruQX0sdNXS8SZ-ACEf1EeJ+Fefi-Egwt9LrcuhNEw@mail.gmail.com"
      type="cite">
      <div dir="ltr">
        <div>
          <div>Dear NCL users <br>
            <br>
          </div>
          I tried to plot xy graph but one problem came out. If you see
          attached file the X axis shows the years&nbsp; like 04.0, 05.0,
          06.0 ....etc<br>
          <br>
        </div>
        I need to convert x axis into 04,&nbsp; 05, 06, ...<br>
        &nbsp;<br>
        <div>
          <div>I used the scripts<br>
            <br>
            <br>
            &nbsp;load
            "/usr/local/lib/ncl/lib/ncarg/nclscripts/csm/gsn_code.ncl"<br>
            &nbsp;load
            "/usr/local/lib/ncl/lib/ncarg/nclscripts/csm/gsn_csm.ncl" <br>
            &nbsp;<br>
            begin<br>
            &nbsp;x = new (8,float)<br>
            &nbsp;y1 = new(8,float)<br>
            &nbsp;y2 = new(8,float)<br>
            <br>
            &nbsp;x = (/04,05,06,07,08,09,10,11/)<br>
            &nbsp;y1 =
(/3.53E+19,3.54E+19,3.51E+19,3.50E+19,3.54E+19,3.55E+19,3.51E+19,3.54E+19/)<br>
            &nbsp;y2 =
            (/300.106,300.5,300.062,300.109,300.960,301.093,299.937,300.578/)<br>
            <br>
            ;---Open workstation and change color map<br>
            &nbsp; wks_type = "pdf"&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; <br>
            &nbsp; wks_type@wkPaperSize = "B"<br>
            &nbsp; wks = gsn_open_wks(wks_type,"xy")<br>
            &nbsp;<br>
            &nbsp;<br>
            ; resources for "left" variable<br>
            <br>
            &nbsp;resL = True<br>
            &nbsp;resL@gsnMaximize&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; = True<br>
            &nbsp;resL@xyLineThicknesses = 3.&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; ; thicker line<br>
            &nbsp;resL@xyLineColors = "blue"<br>
            &nbsp;resL@tiYAxisString = "values1"<br>
            &nbsp;resL@tiXAxisString = "YEARS"<br>
            &nbsp;<br>
            <br>
            <br>
            <br>
            ; resources for "right" variable<br>
            &nbsp;resR = True<br>
            &nbsp;resR@xyLineThicknesses = 3.&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; ; thicker line<br>
            &nbsp;resR@xyLineColors = "red"<br>
            &nbsp;resR@tiYAxisString = "values2"<br>
            &nbsp;<br>
            &nbsp;plot = gsn_csm_xy2(wks,x,y1,y2,resL,resR)<br>
            &nbsp;<br>
            end<br>
            <br>
          </div>
          <div><br>
            <br>
            <div><br clear="all">
              <div>
                <div dir="ltr">
                  <div>Kunal Bali<br>
                  </div>
                  <div>Research Scholar <br>
                  </div>
                  <div>Radio &amp; Atmospheric Science Division <br>
                  </div>
                  <div>CSIR - National Physical Laboratory<br>
                  </div>
                  <div>New Delhi - 110012<br>
                    <br>
                  </div>
                  <div><br>
                  </div>
                  <div><br>
                  </div>
                  <div><br>
                  </div>
                  <div>
                    <p
style="margin:0px;border-collapse:collapse;font-family:Tahoma,Verdana;font-size:12px"><font
                        color="#1F497D"><br>
                      </font></p>
                  </div>
                </div>
              </div>
            </div>
          </div>
        </div>
      </div>
      <br>
      <fieldset class="mimeAttachmentHeader"></fieldset>
      <br>
      <pre wrap="">_______________________________________________
ncl-talk mailing list
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>
    <pre class="moz-signature" cols="72">-- 
Dipl. Geophys. Karin Meier-Fleischer
Visualization
Application Support

Deutsches Klimarechenzentrum GmbH (DKRZ)
Bundesstrasse 45a - D20146 Hamburg - Germany

Phone:    +49 (0)40 460094 126
Fax:      +49 (0)40 460094 270
E-Mail:   <a class="moz-txt-link-abbreviated" href="mailto:meier-fleischer@dkrz.de">meier-fleischer@dkrz.de</a>
URL:      <a class="moz-txt-link-abbreviated" href="http://www.dkrz.de">www.dkrz.de</a>

Gesch&auml;ftsf&uuml;hrer: Prof. Dr. Thomas Ludwig
Sitz der Gesellschaft: Hamburg
Amtsgericht Hamburg HRB 39784
</pre>
  </body>
</html>