Skip to content

mpl_toolkits.axes_grid1.axes_divider.LocatableAxes has inconsistent ticks #7378

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

Closed
QuLogic opened this issue Nov 2, 2016 · 1 comment
Closed

Comments

@QuLogic
Copy link
Member

QuLogic commented Nov 2, 2016

I'm using latest v2.x (4ea9892) to build some documentation and several examples are a bit non-reproducible. It seems like this is usually triggered by the examples that use AxesGrid. I've drilled down to it being something weird with LocatableAxes, which can be seen with this example:

import sys

import matplotlib.pyplot as plt
from matplotlib.transforms import Bbox
from mpl_toolkits.axes_grid1.axes_divider import LocatableAxes
from mpl_toolkits.axes_grid1.mpl_axes import Axes

AxesClass = LocatableAxes
#AxesClass = Axes

fig = plt.figure(1)
ax = AxesClass(fig, Bbox([[0.05, 0.05], [0.95, 0.95]]))
fig.add_axes(ax)

plt.savefig(sys.argv[1] + '.png')

If you run two or three times and compare the images, the ticks in the corners will generally be slightly off, usually differing by one bit in the outermost pixel. If you uncomment the line above to use Axes instead, then there is no issue. If I understand correctly, LocatableAxes just adds the LocatableAxesBase mixin to Axes, which appears to do nothing much by default. So I don't really understand why it breaks stuff.

This is probably related to the bugginess in #6759.

@anntzer
Copy link
Contributor

anntzer commented Jul 6, 2019

LocatableAxes is no more (deprecated in #10403 and removed in master), so I think this can be closed?

@anntzer anntzer closed this as completed Jul 6, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants