-
-
Notifications
You must be signed in to change notification settings - Fork 7.9k
[ENH]: More control of "axis planes" on 3D axes #23216
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
Comments
As of 3.5.0 we have computed_zorder: https://matplotlib.org/stable/api/_as_gen/mpl_toolkits.mplot3d.axes3d.Axes3D.html#mpl-toolkits-mplot3d-axes3d-axes3d. which should allow you to set this manually. |
@tdelcourt Is that title an accurate summary of your request? |
I've tried setting computed_zorder to False and setting zorders (see the following changes to the code below), but this does not change anything at all. There still is the same very slight margin added on all axes even when setting axes limits manually and setting zorders (the order of which doesn't change the behaviour). I'm using matplotlib 3.5.1.
|
I believe this is a duplicate of #18052 ? |
Closing as a duplicate of #18052 @tdelcourt thank you for the report and please let me know if that other issue does not capture the scope of what you're asking for! |
Problem
Duplicate from stackoverflow 72375427 .
When plotting 2D scatter data on a 3D scatter plot (eg as in the example code from matplotlib website, which incidentally shows the problematic behaviour as the sin curve is obviously off by a bit), the 2D data floats "on top" or "alongside" of the 2D face it is supposed to be placed upon and therefore gives the impression to be wrongly plotted. For example, using this to show the projection of dots from the 3D space to 2D planes (3 plot faces) gives the impression that the dots are not at the correct position, because of the parallax (see plot linked below).
3D plot with 2D plots on sides, as produced by above code
3D plot with 2D plots on sides, as expected
I cannot get the planes to exactly be positioned at a specified coordinate. Setting the x_lim, y_lim and z_lim parameters only slightly improves this, but there is still a slight, seemingly random, margin added beyond the axes limits (contrary to what happens in 2D plots).
Proposed solution
I may have missed the option to do this. But it would be nice to have the possibility to overrule the automatic setting of the position of the edge planes so that setting the x_lim, y_lim and z_lim parameters fixes the planes to those specified values (for instance, or another extra parameter).
Another solution based on generating the 2D graphs as images and adding them to the 3D plot could potentially work, but probably is a messy hack more than a solution.
The text was updated successfully, but these errors were encountered: