PlotXYs returns plot coordinates for given set of XYs
(plt *Plot, data XYs)
| 167 | |
| 168 | // PlotXYs returns plot coordinates for given set of XYs |
| 169 | func PlotXYs(plt *Plot, data XYs) XYs { |
| 170 | ps := make(XYs, len(data)) |
| 171 | for i := range data { |
| 172 | ps[i].X, ps[i].Y = plt.PX(data[i].X), plt.PY(data[i].Y) |
| 173 | } |
| 174 | return ps |
| 175 | } |
| 176 | |
| 177 | // XValues implements the Valuer interface, |
| 178 | // returning the x value from an XYer. |