Skip to content

BUG: timeseries subplots may display unnecessary minor ticklabels #7801

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

Merged
merged 1 commit into from
Jul 22, 2014

Conversation

sinhrks
Copy link
Member

@sinhrks sinhrks commented Jul 19, 2014

Related to #7457. The fix was incomplete because it only hides major ticklabels, not minor ticklabels. This causes incorrect result in time-series plot.

(And another problem is rot default is not applied to minor ticks. I'll check this separatelly)

df = pd.DataFrame(np.random.randn(10, 4), index=pd.date_range(start='2014-07-01', freq='M', periods=10))
df.plot(subplots=True)

Current result:

Minor ticklabels of top 3 axes are not hidden.
figure_ng

Result after fix:

figure_ok

@sinhrks
Copy link
Member Author

sinhrks commented Jul 19, 2014

Ah, this is not good as vertical grids are hidden. Leave it a while...

@jreback
Copy link
Contributor

jreback commented Jul 19, 2014

@sinhrks this is a bug-fix or enhancement?

@sinhrks
Copy link
Member Author

sinhrks commented Jul 19, 2014

Fixed to display grid lines, and only hides major and minor ticklabels (hiding minor tick labels is little tricky than I imagined). Updated image of result after fix.

@jreback I think it should be classified as a bug as the same as #7457 (#5897).

@jreback jreback added the Bug label Jul 19, 2014
@jreback jreback added this to the 0.15.0 milestone Jul 19, 2014
@sinhrks sinhrks mentioned this pull request Jul 20, 2014
@sinhrks
Copy link
Member Author

sinhrks commented Jul 21, 2014

Modified to use try...except to avoid any issue caused by mpl.ticker

@jreback
Copy link
Contributor

jreback commented Jul 21, 2014

@sinhrks ping your unmerged issues that you think are ready

@sinhrks
Copy link
Member Author

sinhrks commented Jul 22, 2014

@jreback I think this one is ready.

jreback added a commit that referenced this pull request Jul 22, 2014
BUG: timeseries subplots may display unnecessary minor ticklabels
@jreback jreback merged commit 43ba74e into pandas-dev:master Jul 22, 2014
@jreback
Copy link
Contributor

jreback commented Jul 22, 2014

thanks!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants