Skip to content
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

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

Closed
anntzer opened this issue Jan 17, 2016 · 4 comments
Closed

Comments

@anntzer
Copy link
Contributor

anntzer commented Jan 17, 2016

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
screenshot_20160117_020324
master
screenshot_20160117_020348

@tacaswell
Copy link
Member

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

@tacaswell tacaswell added this to the next major release (2.0) milestone Jan 17, 2016
@mdboom
Copy link
Member

mdboom commented Jan 18, 2016

#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...

@tacaswell
Copy link
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)
.

@efiring
Copy link
Member

efiring commented May 28, 2016

Fixed by #6468

@efiring efiring closed this as completed May 28, 2016
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

4 participants