toyplot
toyplot copied to clipboard
Create useful documentation for margins
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):
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.