File: pgcurs.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 (14 lines) | stat: -rw-r--r-- 234 bytes parent folder | download | duplicates (2)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
require 'narray'
require 'pgplot'
include Pgplot

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

c = PgCursor.new(0,0)
for mode in 0..7
  puts 'Enter a key on the window:'
  c = pgcurs(c.x, c.y)
  pgpt1(c.x, c.y, c.char[0])
end