FazBrowse GitHub Viewer | Trending |
URL:
| Home
Tools: [Download Repo ZIP]   [Original HTTPS Page]

FIX: add set_box_aspect, improve tight bounding box for Axes3D + fix bbox_inches support with fixed box_aspect by tacaswell · Pull Request #17515 · matplotlib/matplotlib · GitHub

Repository navigation

Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension .png  (1) .py  (6) .rst  (1) .svg  (1) All 4 file types selected
Viewed files
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Unified
Split
Hide whitespace
Diff view
Unified
Split
Hide whitespace
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters. Learn more about bidirectional Unicode characters
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,13 @@
Plots made with :class:`~mpl_toolkits.mplot3d.axes3d.Axes3D` were previously
stretched to fit a square bounding box. As this stretching was done after
the projection from 3D to 2D, it resulted in distorted images if non-square
bounding boxes were used.
bounding boxes were used. As of 3.3, this no longer occurs.

As of this release, this no longer occurs.
Currently, modes of setting the aspect (via
`~mpl_toolkits.mplot3d.axes3d.Axes3D.set_aspect`) in data space are
not supported for Axes3D but may be in the future. If you want to
simulate having equal aspect in data space, set the ratio of your data
limits to match the value of `~.get_box_aspect`. To control these
ratios use the `~mpl_toolkits.mplot3d.axes3d.Axes3D.set_box_aspect`
method which accepts the ratios as a 3-tuple of X:Y:Z. The default
aspect ratio is 4:4:3.
4 changes: 0 additions & 4 deletions lib/matplotlib/axes/_base.py
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters. Learn more about bidirectional Unicode characters
Original file line number Diff line number Diff line change
Expand Up @@ -1339,10 +1339,6 @@ def set_aspect(self, aspect, adjustable=None, anchor=None, share=False):
if cbook._str_equal(aspect, 'equal'):
aspect = 1
if not cbook._str_equal(aspect, 'auto'):
if self.name == '3d':
raise NotImplementedError(
'It is not currently possible to manually set the aspect '
'on 3D axes')
aspect = float(aspect) # raise ValueError if necessary

if share:
Expand Down
Loading

Back | FazBrowse Home | New Git URL