Set axis limits from transformed coordinates. Converts limits from transformed coordinates back to data coordinates, applies limit_range_for_scale validation, and sets the axis limits. Parameters ---------- xmin_t, xmax_t, ymin_t, ymax_t, zmin_t, zm
(self, xmin_t, xmax_t, ymin_t, ymax_t,
zmin_t, zmax_t)
| 1396 | return x_data, y_data, z_data |
| 1397 | |
| 1398 | def _set_lims_from_transformed(self, xmin_t, xmax_t, ymin_t, ymax_t, |
| 1399 | zmin_t, zmax_t): |
| 1400 | """ |
| 1401 | Set axis limits from transformed coordinates. |
| 1402 | |
| 1403 | Converts limits from transformed coordinates back to data coordinates, |
| 1404 | applies limit_range_for_scale validation, and sets the axis limits. |
| 1405 | |
| 1406 | Parameters |
| 1407 | ---------- |
| 1408 | xmin_t, xmax_t, ymin_t, ymax_t, zmin_t, zmax_t : float |
| 1409 | Axis limits in transformed coordinates. |
| 1410 | """ |
| 1411 | # Transform back to data space |
| 1412 | xmin, xmax = self.xaxis.get_transform().inverted().transform([xmin_t, xmax_t]) |
| 1413 | ymin, ymax = self.yaxis.get_transform().inverted().transform([ymin_t, ymax_t]) |
| 1414 | zmin, zmax = self.zaxis.get_transform().inverted().transform([zmin_t, zmax_t]) |
| 1415 | |
| 1416 | # Validate limits for scale constraints (e.g., positive for log scale) |
| 1417 | xmin, xmax = self.xaxis._scale.limit_range_for_scale( |
| 1418 | xmin, xmax, self.xy_dataLim.minposx) |
| 1419 | ymin, ymax = self.yaxis._scale.limit_range_for_scale( |
| 1420 | ymin, ymax, self.xy_dataLim.minposy) |
| 1421 | zmin, zmax = self.zaxis._scale.limit_range_for_scale( |
| 1422 | zmin, zmax, self.zz_dataLim.minposx) |
| 1423 | |
| 1424 | # Set the new axis limits |
| 1425 | self.set_xlim3d(xmin, xmax, auto=None) |
| 1426 | self.set_ylim3d(ymin, ymax, auto=None) |
| 1427 | self.set_zlim3d(zmin, zmax, auto=None) |
| 1428 | |
| 1429 | def get_proj(self): |
| 1430 | """Create the projection matrix from the current viewing position.""" |
no test coverage detected