Hi all,
I am trying to create a pie chart but am getting the following error
message:
******************************
**********************************************************************
fatal:fspan: number of elements parameter is less-than-or-equal-to zero,
can't continue
fatal:Execute: Error occurred at or near line 3969 in file
$NCARG_ROOT/lib/ncarg/nclscripts/csm/shea_util.ncl
fatal:Execute: Error occurred at or near line 33 in file piechart.ncl
****************************************************************************************************
It seems that when I have percentage values less than or equal to 0.1 going
into the pie chart, this crash occurs. Otherwise, it's fine.
Below is my script. Note the value of 0.0118351 which I believe causes the
crash:
************************************************************************************************
load "$NCARG_ROOT/lib/ncarg/nclscripts/csm/gsn_code.ncl"
load "$NCARG_ROOT/lib/ncarg/nclscripts/csm/gsn_csm.ncl"
load "$NCARG_ROOT/lib/ncarg/nclscripts/csm/contributed.ncl"
load "$NCARG_ROOT/lib/ncarg/nclscripts/csm/shea_util.ncl"
pcRes = True
pcRes@gsnMaximize = True
srcgroups = asciiread("srcgroups.txt",-1,"string")
percent = (/ 0.111173, 3.05663, 5.30778, 3.19337, 7.87491, 4.52484,
0.0118351, 75.9194 /)
color = (/ "red", "green", "orange", "yellow" \
, "brown","magenta","blue","gray" /)
wks = gsn_open_wks("ps","pie_chart")
plot = pie_chart(wks, percent, srcgroups, color, pcRes)
************************************************************************************************
Any suggestions? Thanks for any help you could give me.
-- Kevin D. Talgo | Research Associate Center for Environmental Modeling for Policy Development Institute for the Environment University of North Carolina at Chapel Hill Chapel Hill, NC 27599-6116 Tel: (919) 962-0741 http://www.ie.unc.edu/cempd
_______________________________________________
ncl-talk mailing list
List instructions, subscriber options, unsubscribe:
http://mailman.ucar.edu/mailman/listinfo/ncl-talk
Received on Mon Jul 19 20:24:39 2010
This archive was generated by hypermail 2.1.8 : Wed Jul 28 2010 - 10:42:06 MDT