# Question:Printing an array of plots workaround

## Question:Printing an array of plots workaround

Maple

As far as I know, exporting an Array or Matrix of plot is not directly possible in Maple 15. Is that right? Is there a workaround?

Refer to this comment:

http://www.mapleprimes.com/questions/36802-Arrayplot#comment63786

However, I read a suggestion by dskoog that seemed to work:

http://www.mapleprimes.com/questions/121011-Export-Whole-Array-Plot-To-GIF-JPEG

A:=Matrix(2,2):
A[1,1]:=plot3d(x*y,x=-1..1,y=-1..1):
A[1,2]:=plot3d(x^2+y^2,x=-1..1,y=-1..1):
A[2,1]:=plot3d(x^3+y,x=-1..1,y=-1..1):
A[2,2]:=plot3d(x+y,x=-1..1,y=-1..1):
plotsetup(gif,plotoutput=`test.gif`,plotoptions=`height=2000,width=2000`);
plots:-display(A);

But when I tried something more like the sort of plot I want to export, it didn't work:

sys := {diff(y(x), x) = z(x), diff(z(x), x) = y(x)}:
var := {y(x), z(x)}:
ini := { y(0) = 0, z(0) = p/10 }:

slave :=
dsolve( sys union ini
, var
, 'type' = numeric
, 'parameters' = [p]
, 'output' = listprocedure
) :

master :=
subs( dummy = eval(slave),
proc (P);
dummy('parameters' = ['p' = P]);
dummy;
end proc
) :

N:=100:
theplot :=
seq( plots:-odeplot
( master(i)
, [x, y(x), z(x)]
, x = -4 .. 4
, 'style' = line
, 'numpoints' = 50
, 'labels' = [`x`,`y`,`z`]
, 'axes' = box
, 'view' = [-4..4,-20..20,0..30]
, 'color' = COLOR(HUE,i/N)
)
, i = [ seq(k, k=1..N) ]
) :

A := Matrix(2,2):
A[1,1] := plots:-display(theplot, 'orientation' = [25,75]) :
A[1,2] := plots:-display(theplot, 'orientation' = [25+1*45,75]):
A[2,1] := plots:-display(theplot, 'orientation' = [25+2*45,75]):
A[2,2] := plots:-display(theplot, 'orientation' = [25+3*45,75]):
plots:-display(A);

plotsetup(gif,plotoutput=`test.gif`,plotoptions=`height=2000,width=2000`);
plots:-display(A);

The nice rendering is from a screen capture of the inline plot (hence the awkward cropping). The last plot in the sequence is what obtains with plotsetup, something obviously very wrong going on. Unlike the first example, which seems to work, this latter example does not. Is there any workaround you can think of? I can export each plot individually and recreate the arrangement with third-party software, but it would be so much more convenient to be able to export all 4 plots together as one object.

﻿