Bug patch: Axis position in arrays of plots

Plots with hfarrays in arrays of plots
View option in arrays of plots

This Maple Advisor Database procedure displayarraypatch installs a patch to correct three bugs in the display of arrays of plots.

> with(plots):

Warning, the name changecoords has been redefined

> p1:= plot(x,x=-2..2,labels=[x,y]):
p2:= plot(x,x=0..5,labels=[x,y]):
display(array([[p1,p2],[p2,p1]]));

[Maple Plot]

The patch makes the positions of the axes in arrays of plots adjustable. This is accomplished using two global variables `plotarray/xaxis` and `plotarray/yaxis` . The initial values of these variables are [5, -1] and [-2, 5], corresponding to the default axis locations. Each is a list whose two entries are the x and y coordinates of the label, where [0,0] is the centre of the plot. For boxed or framed axes you might try

> `plotarray/xaxis`:= [3, -13]:
`plotarray/yaxis`:= [-13,3]:

> display(array([[p1,p2],[p2,p1]]),axes=box);

[Maple Plot]

> A:= densityplot(x,x=0..1,y=0..1):
B:= quickplot(hfarray([[0,0],[1,1],[2,0]])):
display(array([A,B]));

[Maple Plot]

Here is the result with the patch installed.

> display(array([A,B]));

[Maple Plot]

> A:= plot(x,x=0..1,view=[0..1/2,0..1/2]):
B:= plot(x,x=0..1,view=[1/2..1,1/2..1]):
display(array([A,B]));

[Maple Plot]

Here it is with the patch installed:

> A:= plot(x,x=0..1,view=[0..1/2,0..1/2]):
B:= plot(x,x=0..1,view=[1/2..1,1/2..1]):
display(array([A,B]));

[Maple Plot]

For copyright reasons, displayarraypatch is a procedure that produces new versions of the original Maple library procedures `plot/plotarray/object` and `plots/display_array` : we don't include those procedures themselves in the Maple Advisor Database. Running displayarraypatch() once will save the new versions of `plot/plotarray/object` and `plots/display_array` into a library (which could be the Maple Advisor Database library - saving them into Maple's own "lib" library is not recommended). Then (as long as this library's directory is present in your libname before Maple's own "lib" directory), the patched procedures will be used. The directory to be used is the value of savelibname , if that has been assigned a value, otherwise the first one in libname . I recommend that your "advisor" directory containing the Maple Advisor Database files be the first member of libname , so in most cases the corrected procedure will go there. If necessary, assign a new value to savelibname before running displayarraypatch .

> savelibname:= "c:/advisor";

savelibname :=

Now run displayarraypatch() . A warning will result if you attempt to install the patch in a directory whose name does not include the word "advisor", and you will be asked to confirm that this directory is the proper target. This is intended to prevent you from accidentally writing to Maple's own "lib" or "update" libraries.

> displayarraypatch();

Once the patch has been installed, it need not be installed again.

See also: crop , densityplot , display , hfarray , quickplot , plot[options]

Maple Advisor Database R. Israel, 2000