[ncl-talk] Fwd: error with gsnYRefLine
Jayant
jayantkp2979 at gmail.com
Tue Feb 4 11:37:09 MST 2020
Dear,
I am interested in plotting a bar chart for the anomaly data (attached). I
followed the example in example:
https://www.ncl.ucar.edu/Applications/Scripts/bar_4.ncl
But I am getting the following error on including the gsnYRefLine:
fatal:conform_dims: The array to be conformed must have the same number of
dimensions as indicated by the length of the last argument.
I am unable to understand the error which indicates the plot command. If I
comment the gsnYRefLine, it works and gives a simple barchart but it does
not have +ve and -ve separation.
Please advise.
inp = asciiread("./inp_anom.txt",(/66,2/),"float")
ycolc0 = inp(:,0)
test_anom = inp(:,1)
;
fwks = gsn_open_wks ("png","panom_bar")
res = True
res at gsnYRefLine = 0.0
res at gsnXYBarChart = True
res at gsnAboveYRefLineColor = "blue"
res at gsnBelowYRefLineColor = "red"
plot = gsn_csm_xy(fwks,ycol0c,test_anom,res) ; create plot
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mailman.ucar.edu/pipermail/ncl-talk/attachments/20200204/9ef1a9f0/attachment.html>
-------------- next part --------------
1951 0.209055
1952 -0.582123
1953 -0.653302
1954 0.0555196
1955 -0.135659
1956 0.403163
1957 -0.168015
1958 -1.04919
1959 0.849628
1960 -0.23155
1961 0.177271
1962 0.386093
1963 0.124914
1964 0.0837359
1965 -0.257442
1966 -0.158621
1967 0.030201
1968 0.239023
1969 -0.552155
1970 -0.103334
1971 0.975487
1972 -0.175691
1973 0.523131
1974 0.331953
1975 0.830774
1976 0.259595
1977 0.888417
1978 -0.512761
1979 -0.633939
1980 -0.195118
1981 -0.146297
1982 -0.987474
1983 -1.11865
1984 0.000168324
1985 0.05899
1986 0.667812
1987 -0.363367
1988 0.415455
1989 1.03428
1990 0.413098
1991 0.43192
1992 -1.13926
1993 -0.510437
1994 0.888385
1995 0.307207
1996 0.616028
1997 -1.57515
1998 0.193671
1999 0.182493
2000 0.101315
2001 0.230136
2002 0.298958
2003 0.38778
2004 -0.0433989
2005 -1.34458
2006 0.304244
2007 0.213066
2008 0.121888
2009 0.570709
2010 -0.39047
2011 -0.531648
2012 -0.442826
2013 0.195996
2014 0.484818
2015 -0.136361
2016 -0.347539
More information about the ncl-talk
mailing list