[ncl-talk] X Axis query
Kunal Bali
kunal.bali9 at gmail.com
Fri Sep 26 06:37:13 MDT 2014
I changed float to integer
x = new (8,integer)
but still x values coming in decimal (4.0 , 5.0, 6.0)
Kunal Bali
Research Scholar
Radio & Atmospheric Science Division
CSIR - National Physical Laboratory
New Delhi - 110012
On Fri, Sep 26, 2014 at 6:03 PM, Karin Meier-Fleischer <
meier-fleischer at dkrz.de> wrote:
> Hi Kunal,
>
> you defined variable x to float, change it to integer.
>
> Bye,
> Karin
>
> Am 26.09.14 14:16, schrieb Kunal Bali:
>
> Dear NCL users
>
> I tried to plot xy graph but one problem came out. If you see attached
> file the X axis shows the years like 04.0, 05.0, 06.0 ....etc
>
> I need to convert x axis into 04, 05, 06, ...
>
> I used the scripts
>
>
> load "/usr/local/lib/ncl/lib/ncarg/nclscripts/csm/gsn_code.ncl"
> load "/usr/local/lib/ncl/lib/ncarg/nclscripts/csm/gsn_csm.ncl"
>
> begin
> x = new (8,float)
> y1 = new(8,float)
> y2 = new(8,float)
>
> x = (/04,05,06,07,08,09,10,11/)
> 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/)
> y2 = (/300.106,300.5,300.062,300.109,300.960,301.093,299.937,300.578/)
>
> ;---Open workstation and change color map
> wks_type = "pdf"
> wks_type at wkPaperSize = "B"
> wks = gsn_open_wks(wks_type,"xy")
>
>
> ; resources for "left" variable
>
> resL = True
> resL at gsnMaximize = True
> resL at xyLineThicknesses = 3. ; thicker line
> resL at xyLineColors = "blue"
> resL at tiYAxisString = "values1"
> resL at tiXAxisString = "YEARS"
>
>
>
>
> ; resources for "right" variable
> resR = True
> resR at xyLineThicknesses = 3. ; thicker line
> resR at xyLineColors = "red"
> resR at tiYAxisString = "values2"
>
> plot = gsn_csm_xy2(wks,x,y1,y2,resL,resR)
>
> end
>
>
>
>
> Kunal Bali
> Research Scholar
> Radio & Atmospheric Science Division
> CSIR - National Physical Laboratory
> New Delhi - 110012
>
>
>
>
>
>
>
> _______________________________________________
> ncl-talk mailing list
> List instructions, subscriber options, unsubscribe:http://mailman.ucar.edu/mailman/listinfo/ncl-talk
>
>
> --
> 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: meier-fleischer at dkrz.de
> URL: www.dkrz.de
>
> Geschäftsführer: Prof. Dr. Thomas Ludwig
> Sitz der Gesellschaft: Hamburg
> Amtsgericht Hamburg HRB 39784
>
>
> _______________________________________________
> ncl-talk mailing list
> List instructions, subscriber options, unsubscribe:
> http://mailman.ucar.edu/mailman/listinfo/ncl-talk
>
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://mailman.ucar.edu/pipermail/ncl-talk/attachments/20140926/cc7dea32/attachment.html
More information about the ncl-talk
mailing list