Skip to content
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

Simplify import statement #1009

Closed
wants to merge 1 commit into from
Closed

Conversation

bev-a-tron
Copy link
Contributor

While doing the mplot3D tutorial, I found this import statement confusing. Axes3D is not needed specifically for the script to work.

@WeatherGod
Copy link
Member

No, it is in the documentation. importing the Axes3D object is the only consistent way to guarantee that the Axes3D object gets "registered" with matplotlib. It is only because there are other mplot3d imports in this example that it may appear unneeded. However, taking it out would confuse newcomers who have read that in order to use Axes3D with mpl core, that they have to import Axes3D.

Closing.

@WeatherGod WeatherGod closed this Jul 14, 2012
@bev-a-tron
Copy link
Contributor Author

In the init file for mplot3d, there is one line: from axes3d import Axes3D
So, it does get imported when mplot3d is imported.

@WeatherGod
Copy link
Member

Perhaps I was too hasty. I am still not convinced that your change is much
of an improvement under your rationale, but I do see your point. There is
a legacy reason for this because it was only a couple of releases ago that
we were able to do "projection='3d'". Before that, you actually did need
to import Axes3d and use that object directly.

If this change happens, it would be best if it were consistently changed
across all docs and examples. I am not inclined to make such a change, but
I wouldn't get in the way of it if it was done across the board.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants