@@ -268,7 +268,14 @@ def tunit_edges(self, vals=None, M=None):
268
268
269
269
def set_aspect (self , aspect , adjustable = None , anchor = None , share = False ):
270
270
"""
271
- Set the aspect of the axis scaling.
271
+ Set the aspect ratios.
272
+
273
+ Axes 3D does not current support any aspect but 'auto' which fills
274
+ the axes with the data limits.
275
+
276
+ To simulate having equal aspect in data space, set the ratio
277
+ of your data limits to match the value of `~.get_box_aspect`.
278
+ To control box aspect ratios use `~.Axes3D.set_box_aspect`.
272
279
273
280
Parameters
274
281
----------
@@ -281,13 +288,13 @@ def set_aspect(self, aspect, adjustable=None, anchor=None, share=False):
281
288
'auto' automatic; fill the position rectangle with data.
282
289
========= ==================================================
283
290
284
- adjustable : None or {'box', 'datalim'}, optional
291
+ adjustable : None
292
+ Currently ignored by Axes3D
293
+
285
294
If not *None*, this defines which parameter will be adjusted to
286
295
meet the required aspect. See `.set_adjustable` for further
287
296
details.
288
297
289
- Currently ignored by Axes3D
290
-
291
298
anchor : None or str or 2-tuple of float, optional
292
299
If not *None*, this defines where the Axes will be drawn if there
293
300
is extra space due to aspect constraints. The most common way to
@@ -314,7 +321,7 @@ def set_aspect(self, aspect, adjustable=None, anchor=None, share=False):
314
321
"""
315
322
if aspect != 'auto' :
316
323
raise NotImplementedError (
317
- "Axes3D currently only support the aspect arguments "
324
+ "Axes3D currently only supports the aspect argument "
318
325
f"'auto'. You passed in { aspect !r} ."
319
326
)
320
327
@@ -353,28 +360,27 @@ def set_box_aspect(self, aspect, *, zoom=1):
353
360
"""
354
361
Set the axes box aspect.
355
362
356
- The box aspect is the ratio of the axes height to the axes width in
357
- physical units. This is not to be confused with the data
358
- aspect, set via `~.Axes.set_aspect`.
363
+ The box aspect is the ratio of height to width in display
364
+ units for each face of the box when viewed perpendicular to
365
+ that face. This is not to be confused with the data aspect
366
+ (which for Axes3D is always 'auto'). The default ratios are
367
+ 4:4:3 (x:y:z).
368
+
369
+ To simulate having equal aspect in data space, set the box
370
+ aspect to match your data range in each dimension.
359
371
360
- The *zoom* is an Axes3D-only parameter that controls the overall
361
- size of the Axes3D in the figure.
372
+ *zoom* controls the overall size of the Axes3D in the figure.
362
373
363
374
Parameters
364
375
----------
365
376
aspect : 3-tuple of floats or None
366
377
Changes the physical dimensions of the Axes3D, such that the ratio
367
- of the axis lengths in physical units is x:y:z.
378
+ of the axis lengths in display units is x:y:z.
368
379
369
380
If None, defaults to 4:4:3
370
381
371
382
zoom : float
372
383
Control overall size of the Axes3D in the figure.
373
-
374
- See Also
375
- --------
376
- mpl_toolkits.mplot3d.axes3d.Axes3D.set_aspect
377
- for a description of aspect handling.
378
384
"""
379
385
if aspect is None :
380
386
aspect = np .asarray ((4 , 4 , 3 ), dtype = float )
0 commit comments