$SPAD/src/input draw2dsf.input

The Axiom Team December 3, 2016

Abstract

Contents

2

1 License

--Copyright The Numerical Algorithms Group Limited 1994.

— * —

\getchunk{license}
)clear all
--open a file for input
drawList(lp:List Point DoubleFloat):VIEW2D ==
  n := #lp
  g := graphImage()$GRIMAGE
  for p in lp repeat
    component(g,p,pointColorDefault(),lineColorDefault(),pointSizeDefault())
  gi := makeGraphImage(g)$GRIMAGE
  makeViewport2D(gi,[title("Points")])$VIEW2D
readTheFile(filename,numberOfPoints) ==
  filenew:FILE(DoubleFloat):=open(filename,"input")
  llp:=[point([read!(filenew),read!(filenew)])$Point(DoubleFloat)
          for i in 1..numberOfPoints]
-- first we read the file of x, y data
-- we cheat to get at the AXIOM variable
axiom:=string getEnv("AXIOM")$Lisp
pts:=readTheFile(axiom "/../../src/input/draw2dsf.data",1024);
-- then we plot the points
drawList(pts)

———-

References^{[1] nothing}

4