NewScatter returns a Scatter that uses the default glyph style.
(xys XYer)
| 28 | // NewScatter returns a Scatter that uses the |
| 29 | // default glyph style. |
| 30 | func NewScatter(xys XYer) (*Scatter, error) { |
| 31 | data, err := CopyXYs(xys) |
| 32 | if err != nil { |
| 33 | return nil, err |
| 34 | } |
| 35 | return &Scatter{ |
| 36 | XYs: data, |
| 37 | GlyphStyle: DefaultGlyphStyle, |
| 38 | }, err |
| 39 | } |
| 40 | |
| 41 | // Plot draws the Scatter, implementing the plot.Plotter |
| 42 | // interface. |