NewLinePoints returns both a Line and a Points for the given point data.
(xys XYer)
| 198 | // NewLinePoints returns both a Line and a |
| 199 | // Points for the given point data. |
| 200 | func NewLinePoints(xys XYer) (*Line, *Scatter, error) { |
| 201 | s, err := NewScatter(xys) |
| 202 | if err != nil { |
| 203 | return nil, nil, err |
| 204 | } |
| 205 | l := &Line{ |
| 206 | XYs: s.XYs, |
| 207 | LineStyle: DefaultLineStyle, |
| 208 | } |
| 209 | return l, s, nil |
| 210 | } |