[ncl-talk] X Axis query

Dennis Shea shea at ucar.edu
Fri Sep 26 07:34:53 MDT 2014


Please read documentation.

res at tmXBFormat = "f"

Examples:

*tmXBFormat*
<http://www.ncl.ucar.edu/Document/Graphics/Resources/tm.shtml#tmXBFormat>
    cloudsat_1.ncl
<http://www.ncl.ucar.edu/Applications/Scripts/cloudsat_1.ncl> (CloudSat:
Cloud Vertical Structure
<http://www.ncl.ucar.edu/Applications/cloudsat.shtml#ex1>)
    eof_3.ncl <http://www.ncl.ucar.edu/Applications/Scripts/eof_3.ncl>
(empirical
orthogonal functions <http://www.ncl.ucar.edu/Applications/eof.shtml#ex3>)
    gpcp_2.ncl <http://www.ncl.ucar.edu/Applications/Scripts/gpcp_2.ncl> (
GPCP <http://www.ncl.ucar.edu/Applications/gpcp.shtml#ex2>)
    panel_21.ncl <http://www.ncl.ucar.edu/Applications/Scripts/panel_21.ncl>
(panel plots <http://www.ncl.ucar.edu/Applications/panel.shtml#ex21>)
    raster_5.ncl <http://www.ncl.ucar.edu/Applications/Scripts/raster_5.ncl>
(raster plots <http://www.ncl.ucar.edu/Applications/raster.shtml#ex5>)
    time_labels_1.ncl
<http://www.ncl.ucar.edu/Applications/Scripts/time_labels_1.ncl> (time axis
labels <http://www.ncl.ucar.edu/Applications/time_labels.shtml#ex1>)
    tm_8.ncl <http://www.ncl.ucar.edu/Applications/Scripts/tm_8.ncl> (
tickmarks <http://www.ncl.ucar.edu/Applications/tickmarks.shtml#ex8>)
    unique_12.ncl
<http://www.ncl.ucar.edu/Applications/Scripts/unique_12.ncl> (unique plots
<http://www.ncl.ucar.edu/Applications/unique.shtml#ex12>)


In particular,

http://www.ncl.ucar.edu/Applications/tickmarks.shtml
Example 8

On Fri, Sep 26, 2014 at 6:37 AM, Kunal Bali <kunal.bali9 at gmail.com> wrote:

> 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
>>
>>
>
> _______________________________________________
> 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/b6329dbb/attachment.html 


More information about the ncl-talk mailing list