Controlling Pattern Formation in Complex Networks