Skip to content

Loglog plots with shared axes sometimes show incorrect labels #8995

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
mikerenfro opened this issue Aug 5, 2017 · 1 comment
Closed

Loglog plots with shared axes sometimes show incorrect labels #8995

mikerenfro opened this issue Aug 5, 2017 · 1 comment

Comments

@mikerenfro
Copy link

Bug report

Bug summary

Given clean loglog data, loglog subplots with shared axes work correctly. Given arbitrary loglog data, axis labels are removed incompletely.

Code for reproduction

import numpy as np
import matplotlib.pyplot as plt

x_pass = np.logspace(1, 2, 3)
y1_pass = x_pass
y2_pass = 10*x_pass

x_fail = np.array([56., 140., 420.])
y1_fail = x_fail
y2_fail = 10*x_fail

f, ax = plt.subplots(2, sharex=True)
ax[0].loglog(x_pass, y1_pass, 'o')
ax[1].loglog(x_pass, y2_pass, 'o')

f, ax = plt.subplots(2, sharex=True)
ax[0].loglog(x_fail, y1_fail, 'o')
ax[1].loglog(x_fail, y2_fail, 'o')

Actual outcome

correct

incorrect

Expected outcome

The upper subplot in the second figure should hide all its x axis labels, similar to the upper subplot in the first figure.

Matplotlib version

  • Operating System: MacOS 10.12.6
  • Matplotlib Version: 2.0.2
  • Python Version: 3.6.1 (Python 5.3.0)
  • Other Libraries: numpy 1.12.1

Installed from Anaconda3-4.4.0-MacOSX-x86_64.pkg

@QuLogic
Copy link
Member

QuLogic commented Aug 6, 2017

This is a duplicate of #8903.

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