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

Axes3D: tick label positioning logic changed in 1.5.0 #5447

Closed
fjarri opened this issue Nov 9, 2015 · 13 comments
Closed

Axes3D: tick label positioning logic changed in 1.5.0 #5447

fjarri opened this issue Nov 9, 2015 · 13 comments

Comments

@fjarri
Copy link

fjarri commented Nov 9, 2015

Consider the following code:

import matplotlib
matplotlib.use('Agg')
from mpl_toolkits.mplot3d import axes3d
import matplotlib.pyplot as plt

fig = plt.figure(figsize=(4, 3))
ax = fig.add_subplot(111, projection='3d')
X, Y, Z = axes3d.get_test_data(0.05)
matplotlib.rcParams['font.size'] = 7
ax.plot_wireframe(X, Y, Z, rstride=10, cstride=10)

fig.savefig('t_' + matplotlib.__version__ + '.png')

In 1.4.3 it produced the following:

t_1 4 3

But in 1.5.0 I get:

t_1 5 0

Notice how the tick labels are disproportionately far from the axes. Is it some parameter in rcParams that I can revert to 1.4.3 value, or a bug?

@mdboom
Copy link
Member

mdboom commented Nov 9, 2015

@WeatherGod: I don't know if this is 3d-specific or not, but Cc'ing you just in case.

@WeatherGod
Copy link
Member

One of the changes in v1.5 was that mplot3d now respects the labelpad
rcParam: http://matplotlib.org/users/whats_new.html#configuration-rcparams.
However, I am not entirely certain that it was implemented correctly, as it
needed to do some hacky calculations to give a somewhat correct appearance
in various situations. If I were to do a regular 2D plot with your figure
size and fontsize, the tick labels are not all that spaced out...

On Mon, Nov 9, 2015 at 7:53 AM, Michael Droettboom <notifications@github.com

wrote:

@WeatherGod https://github.com/WeatherGod: I don't know if this is
3d-specific or not, but Cc'ing you just in case.


Reply to this email directly or view it on GitHub
#5447 (comment)
.

@tacaswell tacaswell added this to the Critical bugfix release (1.5.1) milestone Dec 1, 2015
@mdboom
Copy link
Member

mdboom commented Dec 8, 2015

git bisect says this was introduced in 0f66d2c

@mdboom
Copy link
Member

mdboom commented Dec 8, 2015

Cc: @WeatherGod, @jbbrokaw I'm not terribly familiar with this code path, so anything you can suggest would be great.

@WeatherGod
Copy link
Member

@mdboom, I wonder if git bisect got caught in a local minimum. The very next commit should have fixed this issue, I think. In #3787, I specifically tested resizing of the figure window with success prior to merging. I suspect something else is going wrong.

@mdboom
Copy link
Member

mdboom commented Dec 9, 2015

The very next commit should have fixed this issue

By the very next commit, you mean c22e057? That doesn't seem to fix it for me.

@mdboom
Copy link
Member

mdboom commented Dec 9, 2015

I specifically tested resizing of the figure window with success prior to merging

I'm not sure resizing of the figure window is necessary to reproduce this...

@WeatherGod
Copy link
Member

if by necessary, do you mean "sufficient"? I would have thought that resizing the figure window would result in different figure sizes.

@mdboom
Copy link
Member

mdboom commented Dec 9, 2015

I don't think this bug is related to figure size at all. The spacing between the axis and the tick labels is too large regardless of the figure size.

@WeatherGod
Copy link
Member

So, perhaps the hardcoded values need to be tweaked? Still curious that I
wouldn't have notice this when I tested this myself.

On Wed, Dec 9, 2015 at 3:19 PM, Michael Droettboom <notifications@github.com

wrote:

I don't think this bug is related to figure size at all. The spacing
between the axis and the tick labels is too large regardless of the figure
size.


Reply to this email directly or view it on GitHub
#5447 (comment)
.

@tacaswell
Copy link
Member

@WeatherGod Planning to punt on this for 1.5.1 unless you know how to fix it.

@tacaswell tacaswell modified the milestones: next bug fix release (2.0.1), Critical bugfix release (1.5.1) Dec 21, 2015
@WeatherGod
Copy link
Member

I won't be able to get to this until maybe later this week. I don't know
what your timeline is for releasing v1.5.1. It should be an easy fix, just
a lot of guessing and checking.

On Mon, Dec 21, 2015 at 4:03 PM, Thomas A Caswell notifications@github.com
wrote:

@WeatherGod https://github.com/WeatherGod Planning to punt on this for
1.5.1 unless you know how to fix it.


Reply to this email directly or view it on GitHub
#5447 (comment)
.

@QuLogic QuLogic modified the milestones: 2.0.1 (next bug fix release), 2.0.2 (next bug fix release) May 3, 2017
@tacaswell tacaswell modified the milestones: 2.1.1 (next bug fix release), 2.2 (next feature release) Oct 9, 2017
@tacaswell
Copy link
Member

This behavior has now been like this for 7 years so closing this issue.

@story645 story645 removed this from the future releases milestone Oct 6, 2022
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

No branches or pull requests

6 participants