begin
npts = 500
x = fspan(-100,100,npts) ; 500 values from -100 to 100.
y = asciiread("xy2.txt",(/npts,4/),"float")
y!0 = "npts" ; Name the dimensions for the sole
y!1 = "ncurves" ; purpose of reordering them.
y2 = y(ncurves|:,npts|:) ; Reorder dimensions to be 4 x 500.
wks = gsn_open_wks ("x11","xy2_ex04")
res = True ; Plot options desired.
res@gsnMaximize = True ; Maximize plot in frame.
res@xyMonoDashPattern = True ; Use one dash pattern (solid)
res@xyLineThicknesses = (/1,2,3,4/) ; Line thicknesses
res@xyLineColors = (/"NavyBlue","HotPink","OrangeRed","ForestGreen"/)
res@trXMinF = min(x) ; Change limits of X and Y axes.
res@trXMaxF = max(x)
res@trYMinF = -500
res@trYMaxF = 1100
plot = gsn_csm_xy (wks,x,y2,res) ; Call the gsn_csm function
; for drawing the curves.
end