func main() { rand.Seed(int64(0)) n := 100 X, Y := randomTriples(n) graphics.DotsPaint(X, Y, "X", "Y", "bubble.png") }
func GraficoRN(H []Estudiante, n int) { y := make([]float64, N) for i := 0; i < len(H); i++ { y[i] = H[i].Renta + H[i].Beca } x := make([]float64, N) for i := 0; i < len(H); i++ { x[i] = H[i].Nota } s := strconv.Itoa(n) graphics.DotsPaint(x, y, "Renta vs Notas / Año "+s, "Notas", "Renta+Beca", "rn"+s+".png") }
func GraficoN(H []Estudiante, n int) { x := make([]float64, N) for i := 0; i < len(H); i++ { x[i] = float64(i) } y := make([]float64, N) for i := 0; i < len(H); i++ { y[i] = H[i].Nota } sort.Float64s(y) s := strconv.Itoa(n) graphics.DotsPaint(x, y, "Notas / Año "+s, "Estudiante[i]", "Nota", "n"+s+".png") }