2 maxima_tempdir: sconcat (maxima_tempdir, "/", "draw-test-", ?getpid ()),
3 print ("rtest_draw: output image and Gnuplot files to", maxima_tempdir),
4 load ("operatingsystem"),
5 /* I SUPPOSE WE SHOULD NUKE THE DIRECTORY IF IT EXISTS ALREADY */
6 mkdir (maxima_tempdir),
8 execute_test (expr, result) ::=
9 block ([file_name_output, file_name_output_path],
11 file_name_output: next_file_name (),
12 /* need to paste path onto file name, since otherwise
13 * the graphic output file is created in the current directory.
15 file_name_output_path: sconcat (maxima_tempdir, "/", file_name_output),
17 /* assign these file names to global variables
18 * so that they can be inspected after the fact
20 file_name_gnuplot: sconcat (file_name_output, ".gnuplot"),
21 file_name_data_gnuplot: sconcat (file_name_output, ".data"),
23 draw_tests[file_name_output]: expr,
24 buildq ([file_name_output_path, file_name_gnuplot, file_name_data_gnuplot, expr, result],
25 (set_draw_defaults ('file_name = file_name_output_path,
26 'gnuplot_file_name = file_name_gnuplot,
27 'data_file_name = file_name_data_gnuplot),
32 next_file_name () := printf (false, "draw-test-~3,'0d", file_name_counter: file_name_counter + 1),
34 /* Define a function that tests if the gnuplot file created by draw contains
37 gnuplot_contains([x]):=block(
39 infile:openr(sconcat(maxima_tempdir,"/",file_name_gnuplot)),
44 while(stringp(line:readline(infile))) do
55 /* Define a function that tests if the gnuplot file created by draw contains
58 gnuplot_contains_string(x):=block(
60 infile:openr(sconcat(maxima_tempdir,"/",file_name_gnuplot)),
63 while(stringp(line:readline(infile))) do
64 if numberp(ssearch(x,line)) then retval:true,
72 /* Test if "title=" affects the gnuplot file. */
75 explicit(sin(x),x,1,10)
78 gnuplot_contains("set title ''");
84 explicit(sin(x),x,1,10)
87 gnuplot_contains("set title 'Test'");
90 /* Test "contour=". */
94 explicit(sin(x*y),x,1,10,y,1,10)
100 explicit(sin(x*y),x,1,10,y,1,10)
103 gnuplot_contains("set contour base");
105 execute_test (draw3d(
108 explicit(sin(x*y),x,1,10,y,1,10)
111 gnuplot_contains("set contour both");
113 execute_test (draw3d(
116 explicit(sin(x*y),x,1,10,y,1,10)
119 gnuplot_contains("set contour surface");
121 execute_test (draw3d(
124 explicit(sin(x*y),x,1,10,y,1,10)
127 gnuplot_contains("set contour base","unset surface");
130 /* Test "axis_3d=". */
131 execute_test (draw3d(
134 explicit(sin(x*y),x,1,10,y,1,10)
137 gnuplot_contains("unset xtics", "unset ytics", "unset ztics", "set border 0");
139 execute_test (draw3d(
142 explicit(sin(x*y),x,1,10,y,1,10)
145 gnuplot_contains("unset xtics");
147 gnuplot_contains("unset ytics");
149 gnuplot_contains("unset ztics");
151 gnuplot_contains("set border 0");
154 /* test the other axis_* commands */
155 execute_test (draw2d(
158 explicit(sin(x),x,1,10)
161 gnuplot_contains("set border 14");
163 execute_test (draw2d(
166 explicit(sin(x),x,1,10)
169 gnuplot_contains("set border 11");
171 execute_test (draw2d(
174 explicit(sin(x),x,1,10)
177 gnuplot_contains("set border 13");
179 execute_test (draw2d(
182 explicit(sin(x),x,1,10)
185 gnuplot_contains("set border 7");
189 /* test all combination of border and transparent */
190 execute_test (draw2d(
192 border = true, transparent = true,
193 polygon([[3,2],[7,2],[5,5]])
196 gnuplot_contains_string("lt ");
198 gnuplot_contains_string("filledcurves ");
200 execute_test (draw2d(
202 border = false, transparent = false,
203 polygon([[3,2],[7,2],[5,5]])
206 gnuplot_contains_string("lt ");
208 gnuplot_contains_string("filledcurves ");
210 execute_test (draw2d(
212 border = true, transparent = false,
213 polygon([[3,2],[7,2],[5,5]])
216 gnuplot_contains_string("lt ");
218 gnuplot_contains_string("filledcurves ");
221 /* test background_color */
222 execute_test (draw2d(
225 background_color="#FF0000",
226 explicit(sin(x),x,0,10)
229 gnuplot_contains_string("obj 1 fc rgb '#ff0000'");
231 execute_test (draw2d(
234 background_color="#00FF0080",
235 explicit(sin(x),x,0,10)
238 gnuplot_contains_string("obj 1 fc rgb '#00ff0080'");
240 execute_test (draw2d(
243 background_color='yellow,
244 explicit(sin(x),x,0,10)
247 gnuplot_contains_string("obj 1 fc rgb '#FFFF00'");
250 /* test line_width and line colors including semi-transparent ones */
251 execute_test (draw2d(
255 explicit(sin(x),x,0,10),
257 explicit(cos(x),x,0,10)
260 gnuplot_contains_string("lw 50");
262 gnuplot_contains_string("lw 50");
264 gnuplot_contains_string("lc rgb '#800000ff'");
266 gnuplot_contains_string("lc rgb '#ff0000'");
268 execute_test (draw2d(
272 explicit(sin(x),x,0,10),
274 explicit(cos(x),x,0,10)
277 gnuplot_contains_string("lc rgb '#FF0000'");
279 gnuplot_contains_string("lc rgb '#0000FF'");
285 gr2d(image(apply('matrix,
286 makelist(makelist(random(200),i,1,30),i,1,30)),0,0,30,30))
289 gnuplot_contains("set colorbox");
291 gnuplot_contains("unset colorbox");
295 gr2d(colorbox = false, image(apply('matrix,
296 makelist(makelist(random(200),i,1,30),i,1,30)),0,0,30,30))
299 gnuplot_contains("set colorbox");
301 gnuplot_contains("unset colorbox");
304 /* test "columns=" */
308 parametric(2*cos(t),5*sin(t),t,0,2*%pi)),
309 gr2d(polygon([4,5,7],[6,4,2])),
314 gnuplot_contains("set size 1.0, 0.5");
316 gnuplot_contains("set size 0.5, 1.0");
320 gr2d(title="Ellipse",
322 parametric(2*cos(t),5*sin(t),t,0,2*%pi)),
323 gr2d(title="Triangle",
324 polygon([4,5,7],[6,4,2])),
329 gnuplot_contains("set size 1.0, 0.5");
331 gnuplot_contains("set size 0.5, 1.0");
333 gnuplot_contains("set title 'Ellipse'");
335 gnuplot_contains("set title 'Triangle'");
338 /* test "allocation=" */
341 dimensions=[1123,1124],
343 explicit(x^2,x,-1,1)),
345 allocation = [[1/4, 1/4],[1/2, 1/2]],
346 explicit(x^3,x,-1,1),
352 gnuplot_contains("set size 0.5, 0.5");
354 gnuplot_contains("set origin 0.25, 0.25");
356 gnuplot_contains_string("size 1123, 1124");
361 terminal='animated_gif,
363 gr2d(explicit(x^2,x,-1,1)),
364 gr2d(explicit(x^3,x,-1,1)),
365 gr2d(explicit(x^4,x,-1,1))),0);
367 gnuplot_contains_string("delay 100");
369 gnuplot_contains_string("set terminal gif enhanced animate");
372 /* test "enhanced3d=". In this instance we don't look at the .gnuplot file
373 but at the data this file causes gnuplot to plot instead.
375 execute_test (draw3d(
378 points([1,2,3,4],[3,5,3,1],[1,7,5,3])),
381 read_nested_list (sconcat (maxima_tempdir, "/", file_name_data_gnuplot));
382 [[1.0,3.0,1.0],[2.0,5.0,7.0],[3.0,3.0,5.0],[4.0,1.0,3.0],[],[]]$
383 execute_test (draw3d(
386 points([1,2,3,4],[3,5,3,1],[1,7,5,3])),
389 read_nested_list (sconcat (maxima_tempdir, "/", file_name_data_gnuplot));
390 [[1.0,3.0,1.0],[2.0,5.0,7.0],[3.0,3.0,5.0],[4.0,1.0,3.0],[],[]]$
391 execute_test (draw3d(
393 enhanced3d = [x-z/10,x,y,z],
394 points([1,2,3,4],[3,5,3,1],[1,7,5,3])),
397 read_nested_list (sconcat (maxima_tempdir, "/", file_name_data_gnuplot));
398 [[1.0,3.0,1.0,0.9],[2.0,5.0,7.0,1.3],[3.0,3.0,5.0,2.5],[4.0,1.0,3.0,3.7],[],[]]$
399 execute_test (draw3d(
402 points([1,2,3,4],[3,5,3,1],[1,7,5,3])),
405 read_nested_list (sconcat (maxima_tempdir, "/", file_name_data_gnuplot));
406 [[1.0,3.0,1.0,1.0],[2.0,5.0,7.0,7.0],[3.0,3.0,5.0,5.0],[4.0,1.0,3.0,3.0],[],[]]$
407 execute_test (draw3d(
409 enhanced3d = [sin(r*s),r,s],
410 explicit(sin(x)*sin(y),x,-2,2,y,-2,2)),
414 /* For the errors object we can at least test if using any of its variants
416 execute_test (draw2d(
419 errors([[1,2,1], [3,5,3], [10,3,1], [17,6,2]])),0);
421 execute_test (draw2d(
424 errors([[1,2,1], [3,5,3], [10,3,1], [17,6,2]])),0);
426 execute_test (draw2d(
429 errors([[1,2,1,1], [3,5,3,2], [10,3,1,1], [17,6,2,2]])),0);
431 execute_test (draw2d(
434 errors([[1,2,1,1], [3,5,3,2], [10,3,1,1], [17,6,2,2]])),0);
436 execute_test (draw2d(
439 errors([[1,2,1,1], [3,5,3,3], [10,3,1,2], [17,6,2,1]])),0);
441 execute_test (draw2d(
444 errors([[1,2,1,1], [3,5,3,3], [10,3,1,2], [17,6,2,1]])),0);
446 execute_test (draw2d(
449 errors([[1,2,1,1,1,1], [3,5,3,3,1,1], [10,3,1,2,2,2], [17,6,2,1,2,1]])),0);
451 execute_test (draw2d(
454 errors([[1,2,1,1,2,2], [3,5,3,3,1,1], [10,3,1,2,2,2], [17,6,2,1,2,1]])),0);
457 /* fill_color and filled_func */
458 execute_test (draw2d(
461 fill_color="#FF0000",
463 explicit(sin(x),x,0,10),
464 fill_color="#0000FF80",
465 explicit(cos(x),x,0,10)
468 gnuplot_contains_string("lc rgb '#800000ff'");
470 gnuplot_contains_string("lc rgb '#ff0000'");
472 execute_test (draw2d(
477 explicit(sin(x),x,0,10),
479 explicit(cos(x),x,0,10)
482 gnuplot_contains_string("lc rgb '#FF0000'");
484 gnuplot_contains_string("lc rgb '#00FF00'");
487 /* Test if drawing a grid works */
488 execute_test (draw2d(
490 explicit(sin(x),x,0,10),
494 gnuplot_contains("set grid xtics ytics mxtics mytics");
496 gnuplot_contains("set mxtics 1");
498 gnuplot_contains("set mytics 1");
500 execute_test (draw2d(
502 explicit(sin(x),x,0,10),
506 gnuplot_contains("set grid xtics ytics mxtics mytics");
508 gnuplot_contains("set mxtics 10");
510 gnuplot_contains("set mytics 1");
512 execute_test (draw2d(
514 explicit(sin(x),x,0,10),
518 gnuplot_contains("set grid xtics ytics mxtics mytics");
520 gnuplot_contains("set mxtics 1");
522 gnuplot_contains("set mytics 10");
524 execute_test (draw2d(
526 explicit(sin(x),x,0,10),
530 gnuplot_contains("set grid xtics ytics mxtics mytics");
532 gnuplot_contains("set mxtics 1");
534 gnuplot_contains("set mytics 11");
536 execute_test (draw2d(
538 explicit(sin(x),x,0,10),
542 gnuplot_contains("set grid xtics ytics mxtics mytics");
544 gnuplot_contains("set mxtics 2");
546 gnuplot_contains("set mytics 10");
548 execute_test (draw2d(
550 explicit(sin(x),x,0,10),
554 gnuplot_contains("unset grid");
557 /* Tests for head_length, head_angle, head_both and head_type */
558 execute_test (draw2d(
586 vector([9,1],[0,6]) ),0);
588 gnuplot_contains_string("vect head size 0.7, 10.0");
590 gnuplot_contains_string("vect head size 0.7, 20.0");
592 gnuplot_contains_string("vect head size 0.7, 30.0");
594 gnuplot_contains_string("vect head size 0.7, 40.0");
596 gnuplot_contains_string("vect head size 0.7, 60.0");
598 gnuplot_contains_string("vect heads size 0.7, 90.0");
600 gnuplot_contains_string("vect heads size 0.7, 120.0 filled");
602 gnuplot_contains_string("vect heads size 0.7, 160.0 empty");
604 gnuplot_contains_string("vect heads size 0.3, 180.0 nofilled");
607 /* Tests for points(...) with values which are not finite reals.
608 * For implementations which permit non-finite IEEE 754 floats,
609 * the symbols infty and nan can be assigned suitable values
610 * before executing this script.
611 * For other implementations, infty and nan can be left as symbols.
613 * SBCL, Clozure CL, ECL, CMUCL, and maybe other implementations
614 * permit non-finite IEEE 754 floats. The details vary; here is
615 * an incantation for SBCL:
617 * :lisp (sb-vm::set-floating-point-modes :traps nil)
618 * :lisp (defparameter $infty (/ 1d0 0d0))
619 * :lisp (defparameter $nan (/ 0d0 0d0))
622 (xx: [2, 3, 5, 7, 11, 13, 17, 19],
623 yy: [11, 7, 17, 5, 2, 13, 19, 3],
625 xx1[1]: xx1[8]: infty,
627 xx2[3]: xx2[4]: xx2[5]: nan,
631 yy2[2]: yy2[4]: yy2[6]: infty,
634 then (make_array (any, length (l[1])), fillarray (%%, l[1]))
635 else (make_array (any, length (l), length (l[1])), fillarray (%%, apply (append, l))),
636 sanitize_nonfinite (l) := subst ([infty = 'infty, nan = 'nan], l),
640 execute_test (draw2d (xlabel = printf (false, "x = ~a", sanitize_nonfinite (xx)), ylabel = printf (false, "y = ~a", sanitize_nonfinite (yy)), terminal = 'png, point_type = 7, points_joined = true, points (xx, yy), title = "points(flat-list, flat-list)"), 0);
643 execute_test (draw2d (xlabel = printf (false, "x = ~a", sanitize_nonfinite (xx)), ylabel = printf (false, "y = ~a", sanitize_nonfinite (yy)), terminal = 'png, point_type = 7, points_joined = true, points (args (transpose (matrix (xx, yy)))), title = "points(nested-list), 2 elements per sublist"), 0);
646 execute_test (draw2d (xlabel = printf (false, "x = ~a", sanitize_nonfinite (xx)), ylabel = printf (false, "y = ~a", sanitize_nonfinite (yy)), terminal = 'png, point_type = 7, points_joined = true, points (array_from (xx), array_from (yy)), title = "points(array-1d, array-1d)"), 0);
649 execute_test (draw2d (xlabel = printf (false, "x = ~a", sanitize_nonfinite (xx)), ylabel = printf (false, "y = ~a", sanitize_nonfinite (yy)), terminal = 'png, point_type = 7, points_joined = true, points (array_from (xx, yy)), title = "points(array-2d), 2 rows"), 0);
652 execute_test (draw2d (xlabel = printf (false, "x = ~a", sanitize_nonfinite (xx)), ylabel = printf (false, "y = ~a", sanitize_nonfinite (yy)), terminal = 'png, point_type = 7, points_joined = true, points (apply (array_from, args (transpose (matrix (xx, yy))))), title = "points(array-2d), 2 columns"), 0);
655 execute_test (draw2d (xlabel = printf (false, "x = ~a", sanitize_nonfinite (xx)), ylabel = printf (false, "y = ~a", sanitize_nonfinite (yy)), terminal = 'png, point_type = 7, points_joined = true, points (matrix (xx, yy)), title = "points(matrix), 2 rows"), 0);
658 execute_test (draw2d (xlabel = printf (false, "x = ~a", sanitize_nonfinite (xx)), ylabel = printf (false, "y = ~a", sanitize_nonfinite (yy)), terminal = 'png, point_type = 7, points_joined = true, points (transpose (matrix (xx, yy))), title = "points(matrix), 2 columns"), 0);
661 execute_test (draw2d (xlabel = printf (false, "x = ~a", sanitize_nonfinite (xx1)), ylabel = printf (false, "y = ~a", sanitize_nonfinite (yy)), terminal = 'png, point_type = 7, points_joined = true, points (xx - 0.1, yy - 0.1), color = red, points (xx1, yy), title = "points(flat-list, flat-list)"), 0);
664 execute_test (draw2d (xlabel = printf (false, "x = ~a", sanitize_nonfinite (xx1)), ylabel = printf (false, "y = ~a", sanitize_nonfinite (yy)), terminal = 'png, point_type = 7, points_joined = true, points (xx - 0.1, yy - 0.1), color = red, points (args (transpose (matrix (xx1, yy)))), title = "points(nested-list), 2 elements per sublist"), 0);
667 execute_test (draw2d (xlabel = printf (false, "x = ~a", sanitize_nonfinite (xx1)), ylabel = printf (false, "y = ~a", sanitize_nonfinite (yy)), terminal = 'png, point_type = 7, points_joined = true, points (xx - 0.1, yy - 0.1), color = red, points (array_from (xx1), array_from (yy)), title = "points(array-1d, array-1d)"), 0);
670 execute_test (draw2d (xlabel = printf (false, "x = ~a", sanitize_nonfinite (xx1)), ylabel = printf (false, "y = ~a", sanitize_nonfinite (yy)), terminal = 'png, point_type = 7, points_joined = true, points (xx - 0.1, yy - 0.1), color = red, points (array_from (xx1, yy)), title = "points(array-2d), 2 rows"), 0);
673 execute_test (draw2d (xlabel = printf (false, "x = ~a", sanitize_nonfinite (xx1)), ylabel = printf (false, "y = ~a", sanitize_nonfinite (yy)), terminal = 'png, point_type = 7, points_joined = true, points (xx - 0.1, yy - 0.1), color = red, points (apply (array_from, args (transpose (matrix (xx1, yy))))), title = "points(array-2d), 2 columns"), 0);
676 execute_test (draw2d (xlabel = printf (false, "x = ~a", sanitize_nonfinite (xx1)), ylabel = printf (false, "y = ~a", sanitize_nonfinite (yy)), terminal = 'png, point_type = 7, points_joined = true, points (xx - 0.1, yy - 0.1), color = red, points (matrix (xx1, yy)), title = "points(matrix), 2 rows"), 0);
679 execute_test (draw2d (xlabel = printf (false, "x = ~a", sanitize_nonfinite (xx1)), ylabel = printf (false, "y = ~a", sanitize_nonfinite (yy)), terminal = 'png, point_type = 7, points_joined = true, points (xx - 0.1, yy - 0.1), color = red, points (transpose (matrix (xx1, yy))), title = "points(matrix), 2 columns"), 0);
682 execute_test (draw2d (xlabel = printf (false, "x = ~a", sanitize_nonfinite (xx)), ylabel = printf (false, "y = ~a", sanitize_nonfinite (yy1)), terminal = 'png, point_type = 7, points_joined = true, points (xx - 0.1, yy - 0.1), color = red, points (xx, yy1), title = "points(flat-list, flat-list)"), 0);
685 execute_test (draw2d (xlabel = printf (false, "x = ~a", sanitize_nonfinite (xx)), ylabel = printf (false, "y = ~a", sanitize_nonfinite (yy1)), terminal = 'png, point_type = 7, points_joined = true, points (xx - 0.1, yy - 0.1), color = red, points (args (transpose (matrix (xx, yy1)))), title = "points(nested-list), 2 elements per sublist"), 0);
688 execute_test (draw2d (xlabel = printf (false, "x = ~a", sanitize_nonfinite (xx)), ylabel = printf (false, "y = ~a", sanitize_nonfinite (yy1)), terminal = 'png, point_type = 7, points_joined = true, points (xx - 0.1, yy - 0.1), color = red, points (array_from (xx), array_from (yy1)), title = "points(array-1d, array-1d)"), 0);
691 execute_test (draw2d (xlabel = printf (false, "x = ~a", sanitize_nonfinite (xx)), ylabel = printf (false, "y = ~a", sanitize_nonfinite (yy1)), terminal = 'png, point_type = 7, points_joined = true, points (xx - 0.1, yy - 0.1), color = red, points (array_from (xx, yy1)), title = "points(array-2d), 2 rows"), 0);
694 execute_test (draw2d (xlabel = printf (false, "x = ~a", sanitize_nonfinite (xx)), ylabel = printf (false, "y = ~a", sanitize_nonfinite (yy1)), terminal = 'png, point_type = 7, points_joined = true, points (xx - 0.1, yy - 0.1), color = red, points (apply (array_from, args (transpose (matrix (xx, yy1))))), title = "points(array-2d), 2 columns"), 0);
697 execute_test (draw2d (xlabel = printf (false, "x = ~a", sanitize_nonfinite (xx)), ylabel = printf (false, "y = ~a", sanitize_nonfinite (yy1)), terminal = 'png, point_type = 7, points_joined = true, points (xx - 0.1, yy - 0.1), color = red, points (matrix (xx, yy1)), title = "points(matrix), 2 rows"), 0);
700 execute_test (draw2d (xlabel = printf (false, "x = ~a", sanitize_nonfinite (xx)), ylabel = printf (false, "y = ~a", sanitize_nonfinite (yy1)), terminal = 'png, point_type = 7, points_joined = true, points (xx - 0.1, yy - 0.1), color = red, points (transpose (matrix (xx, yy1))), title = "points(matrix), 2 columns"), 0);
703 execute_test (draw2d (xlabel = printf (false, "x = ~a", sanitize_nonfinite (xx1)), ylabel = printf (false, "y = ~a", sanitize_nonfinite (yy1)), terminal = 'png, point_type = 7, points_joined = true, points (xx - 0.1, yy - 0.1), color = red, points (xx1, yy1), title = "points(flat-list, flat-list)"), 0);
706 execute_test (draw2d (xlabel = printf (false, "x = ~a", sanitize_nonfinite (xx1)), ylabel = printf (false, "y = ~a", sanitize_nonfinite (yy1)), terminal = 'png, point_type = 7, points_joined = true, points (xx - 0.1, yy - 0.1), color = red, points (args (transpose (matrix (xx1, yy1)))), title = "points(nested-list), 2 elements per sublist"), 0);
709 execute_test (draw2d (xlabel = printf (false, "x = ~a", sanitize_nonfinite (xx1)), ylabel = printf (false, "y = ~a", sanitize_nonfinite (yy1)), terminal = 'png, point_type = 7, points_joined = true, points (xx - 0.1, yy - 0.1), color = red, points (array_from (xx1), array_from (yy1)), title = "points(array-1d, array-1d)"), 0);
712 execute_test (draw2d (xlabel = printf (false, "x = ~a", sanitize_nonfinite (xx1)), ylabel = printf (false, "y = ~a", sanitize_nonfinite (yy1)), terminal = 'png, point_type = 7, points_joined = true, points (xx - 0.1, yy - 0.1), color = red, points (array_from (xx1, yy1)), title = "points(array-2d), 2 rows"), 0);
715 execute_test (draw2d (xlabel = printf (false, "x = ~a", sanitize_nonfinite (xx1)), ylabel = printf (false, "y = ~a", sanitize_nonfinite (yy1)), terminal = 'png, point_type = 7, points_joined = true, points (xx - 0.1, yy - 0.1), color = red, points (apply (array_from, args (transpose (matrix (xx1, yy1))))), title = "points(array-2d), 2 columns"), 0);
718 execute_test (draw2d (xlabel = printf (false, "x = ~a", sanitize_nonfinite (xx1)), ylabel = printf (false, "y = ~a", sanitize_nonfinite (yy1)), terminal = 'png, point_type = 7, points_joined = true, points (xx - 0.1, yy - 0.1), color = red, points (matrix (xx1, yy1)), title = "points(matrix), 2 rows"), 0);
721 execute_test (draw2d (xlabel = printf (false, "x = ~a", sanitize_nonfinite (xx1)), ylabel = printf (false, "y = ~a", sanitize_nonfinite (yy1)), terminal = 'png, point_type = 7, points_joined = true, points (xx - 0.1, yy - 0.1), color = red, points (transpose (matrix (xx1, yy1))), title = "points(matrix), 2 columns"), 0);
724 execute_test (draw2d (xlabel = printf (false, "x = ~a", sanitize_nonfinite (xx2)), ylabel = printf (false, "y = ~a", sanitize_nonfinite (yy)), terminal = 'png, point_type = 7, points_joined = true, points (xx - 0.1, yy - 0.1), color = red, points (xx2, yy), title = "points(flat-list, flat-list)"), 0);
727 execute_test (draw2d (xlabel = printf (false, "x = ~a", sanitize_nonfinite (xx2)), ylabel = printf (false, "y = ~a", sanitize_nonfinite (yy)), terminal = 'png, point_type = 7, points_joined = true, points (xx - 0.1, yy - 0.1), color = red, points (args (transpose (matrix (xx2, yy)))), title = "points(nested-list), 2 elements per sublist"), 0);
730 execute_test (draw2d (xlabel = printf (false, "x = ~a", sanitize_nonfinite (xx2)), ylabel = printf (false, "y = ~a", sanitize_nonfinite (yy)), terminal = 'png, point_type = 7, points_joined = true, points (xx - 0.1, yy - 0.1), color = red, points (array_from (xx2), array_from (yy)), title = "points(array-1d, array-1d)"), 0);
733 execute_test (draw2d (xlabel = printf (false, "x = ~a", sanitize_nonfinite (xx2)), ylabel = printf (false, "y = ~a", sanitize_nonfinite (yy)), terminal = 'png, point_type = 7, points_joined = true, points (xx - 0.1, yy - 0.1), color = red, points (array_from (xx2, yy)), title = "points(array-2d), 2 rows"), 0);
736 execute_test (draw2d (xlabel = printf (false, "x = ~a", sanitize_nonfinite (xx2)), ylabel = printf (false, "y = ~a", sanitize_nonfinite (yy)), terminal = 'png, point_type = 7, points_joined = true, points (xx - 0.1, yy - 0.1), color = red, points (apply (array_from, args (transpose (matrix (xx2, yy))))), title = "points(array-2d), 2 columns"), 0);
739 execute_test (draw2d (xlabel = printf (false, "x = ~a", sanitize_nonfinite (xx2)), ylabel = printf (false, "y = ~a", sanitize_nonfinite (yy)), terminal = 'png, point_type = 7, points_joined = true, points (xx - 0.1, yy - 0.1), color = red, points (matrix (xx2, yy)), title = "points(matrix), 2 rows"), 0);
742 execute_test (draw2d (xlabel = printf (false, "x = ~a", sanitize_nonfinite (xx2)), ylabel = printf (false, "y = ~a", sanitize_nonfinite (yy)), terminal = 'png, point_type = 7, points_joined = true, points (xx - 0.1, yy - 0.1), color = red, points (transpose (matrix (xx2, yy))), title = "points(matrix), 2 columns"), 0);
745 execute_test (draw2d (xlabel = printf (false, "x = ~a", sanitize_nonfinite (xx)), ylabel = printf (false, "y = ~a", sanitize_nonfinite (yy2)), terminal = 'png, point_type = 7, points_joined = true, points (xx - 0.1, yy - 0.1), color = red, points (xx, yy2), title = "points(flat-list, flat-list)"), 0);
748 execute_test (draw2d (xlabel = printf (false, "x = ~a", sanitize_nonfinite (xx)), ylabel = printf (false, "y = ~a", sanitize_nonfinite (yy2)), terminal = 'png, point_type = 7, points_joined = true, points (xx - 0.1, yy - 0.1), color = red, points (args (transpose (matrix (xx, yy2)))), title = "points(nested-list), 2 elements per sublist"), 0);
751 execute_test (draw2d (xlabel = printf (false, "x = ~a", sanitize_nonfinite (xx)), ylabel = printf (false, "y = ~a", sanitize_nonfinite (yy2)), terminal = 'png, point_type = 7, points_joined = true, points (xx - 0.1, yy - 0.1), color = red, points (array_from (xx), array_from (yy2)), title = "points(array-1d, array-1d)"), 0);
754 execute_test (draw2d (xlabel = printf (false, "x = ~a", sanitize_nonfinite (xx)), ylabel = printf (false, "y = ~a", sanitize_nonfinite (yy2)), terminal = 'png, point_type = 7, points_joined = true, points (xx - 0.1, yy - 0.1), color = red, points (array_from (xx, yy2)), title = "points(array-2d), 2 rows"), 0);
757 execute_test (draw2d (xlabel = printf (false, "x = ~a", sanitize_nonfinite (xx)), ylabel = printf (false, "y = ~a", sanitize_nonfinite (yy2)), terminal = 'png, point_type = 7, points_joined = true, points (xx - 0.1, yy - 0.1), color = red, points (apply (array_from, args (transpose (matrix (xx, yy2))))), title = "points(array-2d), 2 columns"), 0);
760 execute_test (draw2d (xlabel = printf (false, "x = ~a", sanitize_nonfinite (xx)), ylabel = printf (false, "y = ~a", sanitize_nonfinite (yy2)), terminal = 'png, point_type = 7, points_joined = true, points (xx - 0.1, yy - 0.1), color = red, points (matrix (xx, yy2)), title = "points(matrix), 2 rows"), 0);
763 execute_test (draw2d (xlabel = printf (false, "x = ~a", sanitize_nonfinite (xx)), ylabel = printf (false, "y = ~a", sanitize_nonfinite (yy2)), terminal = 'png, point_type = 7, points_joined = true, points (xx - 0.1, yy - 0.1), color = red, points (transpose (matrix (xx, yy2))), title = "points(matrix), 2 columns"), 0);
766 execute_test (draw2d (xlabel = printf (false, "x = ~a", sanitize_nonfinite (xx2)), ylabel = printf (false, "y = ~a", sanitize_nonfinite (yy2)), terminal = 'png, point_type = 7, points_joined = true, points (xx - 0.1, yy - 0.1), color = red, points (xx2, yy2), title = "points(flat-list, flat-list)"), 0);
769 execute_test (draw2d (xlabel = printf (false, "x = ~a", sanitize_nonfinite (xx2)), ylabel = printf (false, "y = ~a", sanitize_nonfinite (yy2)), terminal = 'png, point_type = 7, points_joined = true, points (xx - 0.1, yy - 0.1), color = red, points (args (transpose (matrix (xx2, yy2)))), title = "points(nested-list), 2 elements per sublist"), 0);
772 execute_test (draw2d (xlabel = printf (false, "x = ~a", sanitize_nonfinite (xx2)), ylabel = printf (false, "y = ~a", sanitize_nonfinite (yy2)), terminal = 'png, point_type = 7, points_joined = true, points (xx - 0.1, yy - 0.1), color = red, points (array_from (xx2), array_from (yy2)), title = "points(array-1d, array-1d)"), 0);
775 execute_test (draw2d (xlabel = printf (false, "x = ~a", sanitize_nonfinite (xx2)), ylabel = printf (false, "y = ~a", sanitize_nonfinite (yy2)), terminal = 'png, point_type = 7, points_joined = true, points (xx - 0.1, yy - 0.1), color = red, points (array_from (xx2, yy2)), title = "points(array-2d), 2 rows"), 0);
778 execute_test (draw2d (xlabel = printf (false, "x = ~a", sanitize_nonfinite (xx2)), ylabel = printf (false, "y = ~a", sanitize_nonfinite (yy2)), terminal = 'png, point_type = 7, points_joined = true, points (xx - 0.1, yy - 0.1), color = red, points (apply (array_from, args (transpose (matrix (xx2, yy2))))), title = "points(array-2d), 2 columns"), 0);
781 execute_test (draw2d (xlabel = printf (false, "x = ~a", sanitize_nonfinite (xx2)), ylabel = printf (false, "y = ~a", sanitize_nonfinite (yy2)), terminal = 'png, point_type = 7, points_joined = true, points (xx - 0.1, yy - 0.1), color = red, points (matrix (xx2, yy2)), title = "points(matrix), 2 rows"), 0);
784 execute_test (draw2d (xlabel = printf (false, "x = ~a", sanitize_nonfinite (xx2)), ylabel = printf (false, "y = ~a", sanitize_nonfinite (yy2)), terminal = 'png, point_type = 7, points_joined = true, points (xx - 0.1, yy - 0.1), color = red, points (transpose (matrix (xx2, yy2))), title = "points(matrix), 2 columns"), 0);
787 block ([L: flatten (rest (arrayinfo (draw_tests), 2)), linel: 1000],
788 with_stdout (sconcat (maxima_tempdir, "/draw-tests-summary.txt"),
789 for f in L do print (f, "pertains to", string (draw_tests[f]))),