use xy limits in second method