gonum / gonum/plot

plotter: NewPolygon should take an interface rather than a list of interfaces

Open
#442 0 comments 0 reactions 0 assignees View on GitHub
Dominant language
Go
Stars
3k
Forks
201
PR merge metrics
No merged PRs in 30d

Description

Right now, plotter.NewPolygon takes `...XYer` as an input. However, it seems like it is difficult to actually get data in that format.

Would it make sense to add an interface something like:

```go
XYers interface{
Len() int
LenAt(int) int
XY(int, int) (x, y float64)
}
```

That might be easier to implement.

Contributor guide

Open the contributing guide

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.