plotSave of a set of subplots.

As per the manual, plotSave "Saves the last created graph to a user specified file type." But when there is a set of subplots, how to save the whole set as, say, a PDF file? Manually, I can use Export Graph, but is there a command to do this?

1 Answer



0



The command plotSave treats the entire graph tab as one image--all subplots or custom regions included. The code below illustrates this:

x = seqa(1, 1, 10);


for i(1, 4, 1);
	y = rndn(rows(x), 1);
	plotLayout(2, 2, i);
	plotScatter(x, y);
endfor;

plotClearLayout();
plotSave("sample.pdf", 30|18);

After running this code snippet you should have a file sample.pdf in your current working directory that shows all four supblots.

Click to view exported pdf graphic

aptech

1,773

Your Answer

1 Answer

0

The command plotSave treats the entire graph tab as one image--all subplots or custom regions included. The code below illustrates this:

x = seqa(1, 1, 10);


for i(1, 4, 1);
	y = rndn(rows(x), 1);
	plotLayout(2, 2, i);
	plotScatter(x, y);
endfor;

plotClearLayout();
plotSave("sample.pdf", 30|18);

After running this code snippet you should have a file sample.pdf in your current working directory that shows all four supblots.

Click to view exported pdf graphic


You must login to post answers.

Have a Specific Question?

Get a real answer from a real person

Need Support?

Get help from our friendly experts.