Skip to content

Raise NotImplementedError with equal aspect on 3D axes #13474

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 1 commit into from
Feb 21, 2019

Conversation

dstansby
Copy link
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))

Copy link
Member

@jklymak jklymak left a comment

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
Copy link
Contributor

anntzer commented Feb 20, 2019

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

@jklymak
Copy link
Member

jklymak commented Feb 21, 2019

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

@anntzer
Copy link
Contributor

anntzer commented Feb 21, 2019

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