Update the data limits for the given collection.
(self, collection)
| 2593 | self.update_datalim(xys, updatex=updatex, updatey=updatey) |
| 2594 | |
| 2595 | def _update_collection_limits(self, collection): |
| 2596 | """Update the data limits for the given collection.""" |
| 2597 | datalim = collection.get_datalim(self.transData) |
| 2598 | points = datalim.get_points() |
| 2599 | if not np.isinf(datalim.minpos).all(): |
| 2600 | # By definition, if minpos (minimum positive value) is set |
| 2601 | # (i.e., non-inf), then min(points) <= minpos <= max(points), |
| 2602 | # and minpos would be superfluous. However, we add minpos to |
| 2603 | # the call so that self.dataLim will update its own minpos. |
| 2604 | # This ensures that log scales see the correct minimum. |
| 2605 | points = np.concatenate([points, [datalim.minpos]]) |
| 2606 | # only update the dataLim for x/y if the collection uses transData |
| 2607 | # in this direction. |
| 2608 | x_is_data, y_is_data = (collection.get_transform() |
| 2609 | .contains_branch_separately(self.transData)) |
| 2610 | ox_is_data, oy_is_data = (collection.get_offset_transform() |
| 2611 | .contains_branch_separately(self.transData)) |
| 2612 | self.update_datalim( |
| 2613 | points, |
| 2614 | updatex=x_is_data or ox_is_data, |
| 2615 | updatey=y_is_data or oy_is_data, |
| 2616 | ) |
| 2617 | |
| 2618 | def add_table(self, tab): |
| 2619 | """ |
no test coverage detected