mplot3d: scatter (and others) incorrectly auto-scale axes after set_[xyz]lim() #783

zpincus opened this Issue Mar 21, 2012 · 2 comments

2 participants


The 2d plot functions have some state variables so that if the axes have been manually re-scaled using the set_[xy]lim() functions (or wrappers around them), calling a plot function (like scatter) won't re-scale the axes.

This functionality appears to be missing / inactive in 3d plots:

import matplotlib.pyplot as plt
from mpl_toolkits.mplot3d import Axes3D

ax = plt.axes(projection='3d')

Note that the manually-set limits are no longer respected. Compare to the 2d case, where this works:

import matplotlib.pyplot as plt

ax = plt.axes()
@WeatherGod WeatherGod was assigned Mar 21, 2012
Matplotlib Developers member

Actually, I think I know what is happening here and I might be able to fix this one later tonight.

Matplotlib Developers member

This (and other things) are now fixed in PR #1289. It is doubtful it will make it in to the v1.2.0 release, but it will end up in the v1.2.x branch.

@WeatherGod WeatherGod added a commit that closed this issue Dec 3, 2012
@WeatherGod WeatherGod Autoscaling and limits in mplot3d.
    * Fixes improper setting of x,y,z limits not turning off autoscaling
    * Adds units support to z-axis
    * Adds shared axis support for z-axis
    * Closes #783
@WeatherGod WeatherGod closed this in e76fd7f Dec 3, 2012
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment