def _update_patch_limits(self, patch):
<EOL>if (isinstance(patch, mpatches.Rectangle) and<EOL>(patch.get_width()==<NUM_LIT:0> or patch.get_height()==<NUM_LIT:0>)):<EOL><INDENT>return<EOL><DEDENT>vertices = patch.get_path().vertices<EOL>if vertices.size > <NUM_LIT:0>:<EOL><INDENT>xys = patch.get_patch_transform().transform(vertices)<EOL>if patch.get_data_transform() != self.transData:<EOL><INDENT>transform = (patch.get_data_transform() +<EOL>self.transData.inverted())<EOL>xys = transform.transform(xys)<EOL><DEDENT>self.update_datalim(xys, updatex=patch.x_isdata,<EOL>updatey=patch.y_isdata)<EOL><DEDENT>
update the data limits for patch *p*