Skip to content

Raise NotImplementedError with equal aspect on 3D axes - #13474

Merged
timhoffm merged 1 commit into
matplotlib:masterfrom
dstansby:3d-equal-aspect
Feb 21, 2019
Merged

timhoffm merged 1 commit into
matplotlib:masterfrom
dstansby:3d-equal-aspect

Conversation

@dstansby

Copy link
Copy Markdown
Member

See #1077. Until it is implemented properly, it seems reasonable to raise a NotImplementedError (and not a warning, because trying to set an equal aspect results in nonsense: #1077 (comment))

Comment thread lib/matplotlib/axes/_base.py Resolved

@jklymak jklymak left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Another option is to warn or log.info.

@anntzer

anntzer commented Feb 20, 2019

Copy link
Copy Markdown
Contributor

(I'm in favor of actually throwing an exception, given that the resulting plot is just plain wrong.)

@jklymak

jklymak commented Feb 21, 2019

Copy link
Copy Markdown
Member

I meant warn and not set the aspect ratio, not warn and do something buggy 😉

@anntzer

anntzer commented Feb 21, 2019

Copy link
Copy Markdown
Contributor

Right now we raise if someone does set_aspect("foobar"); I think passing "equal" to 3D axes is essentially the same.

@timhoffm
timhoffm merged commit f8f6fdf into matplotlib:master Feb 21, 2019
@dstansby
dstansby deleted the 3d-equal-aspect branch February 21, 2019 17:52
@QuLogic QuLogic added this to the v3.1.0 milestone Jul 24, 2019
kip-hart pushed a commit to kip-hart/MicroStructPy that referenced this pull request Sep 12, 2019
ftherrien pushed a commit to ftherrien/p2ptrans that referenced this pull request Jan 15, 2020
The NotImplemented error was caused by the fact that set_aspect now causes an error in matplotlib (see matplotlib/matplotlib#1077 and matplotlib/matplotlib#13474). Fixed by making the figure itself square such that the 3D axis are square.

Also change the fortan module's name from p2ptrans to fmodules which prevented from importing p2ptrans as a python module.
SenorPez added a commit to SenorPez/glowing-potato that referenced this pull request Jan 28, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

5 participants