DKRZ NCL xy-plot exampleΒΆ

Example script:

;-----------------------------------------------------------------
;
;  DKRZ - NCL Example:   NCL_xy_plot.ncl
;
;  30.10.14  kmf
;-----------------------------------------------------------------
begin

   x = (/1,2,3,4,5,6,7,8,9,10/)               ;-- define data
   y = (/3,7,4,9,2,1,8,8,4,2/)                ;-- define data

   wks_type = "png"
   wks_type@wkWidth   =  1024
   wks_type@wkHeight  =  1024
   wks = gsn_open_wks(wks_type,"plot_xy_plot")   ;-- open workstation

   res                        =  True
   res@tiMainString           = "DKRZ - NCL Example:~C~        xy-plot resources"  ;-- title string

   res@xyLineColor            = "blue"        ;-- define line color
   res@xyLineThicknessF       =  5            ;-- define line thickness

   plot = gsn_csm_xy(wks, x, y, res)          ;-- create xy-plot

 end

Result:

../../../../../../_images/plot_xy_plot_w400.png