Previous Up Next

20.2.3  Polygonal paths

The polygonplot or ligne_polygonale command draws a polygonal path through given points.

Examples

polygonplot([0,1,4,9,16])

or:

polygonplot([0,1,2,3,4],[0,1,4,9,16])

or:

polygonplot([[0,0],[1,1],[2,4],[3,9],[4,16]])

or:

polygonplot([[2,4],[0,0],[3,9],[1,1],[4,16]])

The listplot or plotlist draws a polygonal path, but in an order determined by you.

Unlike polygonplot, the listplot command cannot be given two lists of numbers as arguments.

Examples

listplot([[2,4],[0,0],[3,9],[1,1],[4,16]])
listplot([0,1,4,9,16])

If you want to get coordinates on the polygonal path, use the The linear_interpolate command will find coordinates on the polygonal path.

Example

linear_interpolate([[1,2,6,9],[3,4,6,12]],2,7,1)
     


2.03.04.05.06.07.0
4.04.55.05.56.08.0


          

Previous Up Next