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

Create useful documentation for margins #179

Open
slinnarsson opened this issue Aug 5, 2017 · 1 comment
Open

Create useful documentation for margins #179

slinnarsson opened this issue Aug 5, 2017 · 1 comment

Comments

@slinnarsson
Copy link

I would like to increase the font size for the axis tick marks. Maybe I'm not doing it right (but I also could not find any documentation for how it should be done). This code:

import toyplot as tp
_, axes, _ = tp.plot(hpf.log_likelihoods, width=300)
axes.y.ticks.labels.angle = -90
axes.y.ticks.labels.style = {"font-size": "9pt"}

..makes the tick labels larger, but they are truncated on the left side, giving the paradoxical impression of a reverse axis direction (all numbers are negative, as shown by the indicator):

screen shot 2017-08-05 at 15 47 51

@tshead2
Copy link
Member

tshead2 commented Aug 7, 2017

You can use the margin property to put more space between the axes and the edge of the canvas:

    _, axes, _ = tp.plot(hpf.log_likelihoods, width=300, margin=100)

You can specify non-uniform margins using (vertical, horizontal) or (top, right, bottom, left) tuples.

@tshead2 tshead2 added this to the Toyplot 0.16.0 milestone Aug 7, 2017
@tshead2 tshead2 changed the title Axes tick labels are truncated at larger font size Create useful documentation for margins Aug 7, 2017
@tshead2 tshead2 modified the milestones: Toyplot 0.16.0, Toyplot 0.17.0 Nov 1, 2017
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