Error bar example

The following script demonstrates the plotting of error bars. See the figure below.

     X=[0:20]                 ! generate some "data"
     Y=X^2-20*X+50            !
     YEL=10*RAN(X)            ! lower error
     YEU=10*RAN(X)            ! upper error
     YES=20*RAN(X)            ! symmetric error
     SET PLOTSYMBOL -1        ! set plotting symbol
     WINDOW 5                 ! set window
     SET XLABEL 'Asymmetric errors'
     GRAPH X Y YEL,,YEU       ! plot with asymmetric errors
     WINDOW 6                 ! change windows
     SET XLABEL 'Symmetric errors'
     GRAPH X Y YES            ! plot with symmetric errors

Error bars