File: ebars.jgr

package info (click to toggle)
jgraph 83-19
  • links: PTS
  • area: main
  • in suites: woody
  • size: 624 kB
  • ctags: 445
  • sloc: ansic: 4,728; makefile: 186; sh: 106; awk: 104
file content (24 lines) | stat: -rw-r--r-- 605 bytes parent folder | download | duplicates (6)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
(* This graph shows the use of y_epts to get error bars onto the graph.
   It plots the curve y = 2x plus or minus x/2 for integer x values
   from from 1 to 10 *)

newgraph
xaxis min 0 max 10 label : x
yaxis min 0 max 25 label : y = 2x +- x/2

newcurve marktype circle linetype dotted
  (* These points could equally be generated by: 
     y_epts shell : echo "" |\
      awk '{ for (i = 1; i < 11; i++) print i, 2*i, 2*i-i/2.0, 2*i+i/2.0}'
   *)
  y_epts
   1 2 1.5 2.5
   2 4 3 5
   3 6 4.5 7.5
   4 8 6 10
   5 10 7.5 12.5
   6 12 9 15
   7 14 10.5 17.5
   8 16 12 20
   9 18 13.5 22.5
   10 20 15 25