dfm / dfm/corner.py

top ticks not shown for last axes

Open
#294 0 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

Dominant language
Python
Stars
576
Forks
234
PR merge metrics
No merged PRs in 30d

Description

Using the option top_ticks=True does not add the ticks to the last (bottom right) panel, e.g.:

import numpy as np
import corner

fig = corner(np.random.normal(size = (10_000, 2)), top_ticks = True)
Image

One can add it back in manually, e.g.,

fig.axes[-1].tick_params(
    axis = 'x', top = True, labeltop = True,
    rotation = fig.axes[-1].get_xticklabels()[0].get_rotation(),
)
Image

but it'd be good to work as intended.

Contributor guide

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Run the reported corner(np.random.normal(...), top_ticks=True) example and inspect the axes returned by fig.axes, focusing on the last bottom-right panel. Compare its tick configuration with the manual fig.axes[-1].tick_params workaround; done means top ticks and labels appear there without manual intervention.

Written by the indexing model from the issue text.

Assessment

Tech stack
numpy, python
Domain
data-visualization
Issue type
Bug
Difficulty
2/5
Estimated time
1-3 hours
Activity status
Stale
Clarity
Clearly specified
Newbie friendliness
55/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.