FazBrowse GitHub Viewer | Trending |
URL:
| Home
Tools: [Download Repo ZIP]   [Original HTTPS Page]

tight_layout doesn't leave enough space between outwards ticks and axes title · Issue #5868 · matplotlib/matplotlib · GitHub

Repository navigation

tight_layout doesn't leave enough space between outwards ticks and axes title #5868

Closed

Description

All's in the title (notice how the descender of the "j" (also pretty bad with "g") runs into the outwards tick).

from pylab import *
rcParams["xtick.direction"] = "out"
gca().set_title("j" * 30)
tight_layout()
show()

1.5.0

master

Activity

  1. tacaswell commented on Jan 17, 2016

    Member

    @mdboom Do you have a fix for this on an un-merged branch?

  2. added this to the milestone on Jan 17, 2016
  3. mdboom commented on Jan 18, 2016

    Member

    #5683 (merged to 2.x) is somewhat related, but only includes the outward ticks in the tight layout calculation -- it doesn't address the tick-to-text relationship.

    We don't really have any automatic tick-to-text work at present. The planned fix in #5774 is just to increase the distance between the spine and the tick labels in the defaults -- and styles with inward ticks would set the space to some lower value.

    However, I wouldn't be opposed to automatically adding the tick length to the spine-to-tick label distance when the ticks are outward if we can find a clean way to do it that doesn't have negative consequences.

    All this, like many other things, is really crying out for a proper constraint-based layout engine that we don't have. (And I often wonder how much brittle and hard-to-maintain ad hoc layout code would go away if we had a constraint engine)... but I digress...

  4. tacaswell commented on Jan 18, 2016

    Member

    https://github.com/nucleic/kiwi is said engine (and it is already shipped
    by conda). The hard part is writing all of the rules...

    On Mon, Jan 18, 2016 at 1:45 PM Michael Droettboom notifications@github.com
    wrote:

    #5683 #5683 (merged to
    2.x) is somewhat related, but only includes the outward ticks in the tight
    layout calculation -- it doesn't address the tick-to-text relationship.

    We don't really have any automatic tick-to-text work at present. The
    planned fix in #5774 #5774
    is just to increase the distance between the spine and the tick labels in
    the defaults -- and styles with inward ticks would set the space to some
    lower value.

    However, I wouldn't be opposed to automatically adding the tick length to
    the spine-to-tick label distance when the ticks are outward if we can find
    a clean way to do it that doesn't have negative consequences.

    All this, like many other things, is really crying out for a proper
    constraint-based layout engine that we don't have. (And I often wonder how
    much brittle and hard-to-maintain ad hoc layout code would go away if we
    had a constraint engine)... but I digress...

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

  5. efiring commented on May 28, 2016

    Member

    Fixed by #6468

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

      Milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions


      Back | FazBrowse Home | New Git URL