File: pgband.rb

package info (click to toggle)
ruby-pgplot 0.1.3-6
  • links: PTS, VCS
  • area: contrib
  • in suites: wheezy
  • size: 480 kB
  • sloc: ruby: 1,382; ansic: 73; makefile: 37
file content (21 lines) | stat: -rw-r--r-- 362 bytes parent folder | download | duplicates (5)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
require 'narray'
require 'pgplot'
include Pgplot

pgbeg
pgenv 0, 1, 0, 1
pglab '','','Demo of PGBAND'

c = PgCursor.new(0,0)
for mode in 0..7
  puts 'Mode %d: Enter key or click on the window'%mode
  c = pgband(mode, c.x, c.y)
  p c
end

x = y = 0
for mode in 0..7
  puts 'Mode %d: Enter key or click on the window'%mode
  x,y = pgband(mode, x, y)
  p [x,y]
end