toyplot icon indicating copy to clipboard operation
toyplot copied to clipboard

Create useful documentation for margins

Open slinnarsson opened this issue 8 years ago • 1 comments

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

slinnarsson avatar Aug 05 '17 13:08 slinnarsson

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 avatar Aug 07 '17 15:08 tshead2