Hi,
In addition to Chris' "right" approach, if you to make a "retrofit" code to your current code, you can simply add:
layer -j;
to extract all plots in separate layers. Then, you can link the layers such as by:
layer2.link=1;
layer2.X.link=0;
Hope this also helps you.
--Hideo