(self)
| 267 | return len(text) > 4 |
| 268 | |
| 269 | def _get_coord_info(self): |
| 270 | # Get scaled limits directly from the axes helper |
| 271 | xmin, xmax, ymin, ymax, zmin, zmax = self.axes._get_scaled_limits() |
| 272 | mins = np.array([xmin, ymin, zmin]) |
| 273 | maxs = np.array([xmax, ymax, zmax]) |
| 274 | |
| 275 | # Get data-space bounds for _transformed_cube |
| 276 | bounds = (*self.axes.get_xbound(), |
| 277 | *self.axes.get_ybound(), |
| 278 | *self.axes.get_zbound()) |
| 279 | bounds_proj = self.axes._transformed_cube(bounds) |
| 280 | |
| 281 | # Determine which one of the parallel planes are higher up: |
| 282 | means_z0 = np.zeros(3) |
| 283 | means_z1 = np.zeros(3) |
| 284 | for i in range(3): |
| 285 | means_z0[i] = np.mean(bounds_proj[self._PLANES[2 * i], 2]) |
| 286 | means_z1[i] = np.mean(bounds_proj[self._PLANES[2 * i + 1], 2]) |
| 287 | highs = means_z0 < means_z1 |
| 288 | |
| 289 | # Special handling for edge-on views |
| 290 | equals = np.abs(means_z0 - means_z1) <= np.finfo(float).eps |
| 291 | if np.sum(equals) == 2: |
| 292 | vertical = np.where(~equals)[0][0] |
| 293 | if vertical == 2: # looking at XY plane |
| 294 | highs = np.array([True, True, highs[2]]) |
| 295 | elif vertical == 1: # looking at XZ plane |
| 296 | highs = np.array([True, highs[1], False]) |
| 297 | elif vertical == 0: # looking at YZ plane |
| 298 | highs = np.array([highs[0], False, False]) |
| 299 | |
| 300 | return mins, maxs, bounds_proj, highs |
| 301 | |
| 302 | def _calc_centers_deltas(self, maxs, mins): |
| 303 | centers = 0.5 * (maxs + mins) |
no test coverage detected