AddYErrorBars adds YErrorBars to a plot. The variadic arguments must be of type plotter.XYer, and plotter.YErrorer. Each errorer is added to the plot the color from the Colors function corresponding to its position in the argument list. If an error occurs then none of the plotters are added to the
(plt *plot.Plot, es ...interface {
plotter.XYer
plotter.YErrorer
})
| 364 | // If an error occurs then none of the plotters are added |
| 365 | // to the plot, and the error is returned. |
| 366 | func AddYErrorBars(plt *plot.Plot, es ...interface { |
| 367 | plotter.XYer |
| 368 | plotter.YErrorer |
| 369 | }) error { |
| 370 | var ps []plot.Plotter |
| 371 | for i, e := range es { |
| 372 | bars, err := plotter.NewYErrorBars(e) |
| 373 | if err != nil { |
| 374 | return err |
| 375 | } |
| 376 | bars.Color = Color(i) |
| 377 | ps = append(ps, bars) |
| 378 | } |
| 379 | plt.Add(ps...) |
| 380 | return nil |
| 381 | } |
nothing calls this directly
no test coverage detected