File: pgncur.rb

package info (click to toggle)
ruby-pgplot 0.2.0-5
  • links: PTS, VCS
  • area: main
  • in suites: forky, sid, trixie
  • size: 496 kB
  • sloc: ruby: 1,625; makefile: 77; ansic: 57; sh: 17
file content (14 lines) | stat: -rw-r--r-- 214 bytes parent folder | download | duplicates (5)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
require 'narray'
require 'pgplot'
include Pgplot

n = 10
x = NArray.sfloat(n).indgen!
y = NArray.sfloat(n).indgen!

pgbeg
pgenv 0, 10, 0, 10
pglab '','','Demo of PGNCUR'

n = pgncur(x,y,2,n/2)
p x[0...n], y[0...n]