code: func NewPathFromXYSlice(data [][]float64) *Path {
  	p := NewPathPreallocate(0, len(data))
  
  	for i := range data {
  		if data[i] != nil && len(data[i]) >= 2 {
  			p.PointSet = append(p.PointSet, Point{data[i][0], data[i][1]})
  		}
  	}
  
  	return p
  }
docs: // NewPathFromXYSlice creates a path from a slice of []float64 values.
  // The first two elements are taken to be horizontal and vertical components of each point respectively.
  // The rest of the elements of the slice are ignored. Nil slices are skipped.