GridSpec#

Quickly layout

[1]:
import trackc as tc

trackc.tenon#

[2]:
ten = tc.tenon(figsize=(5, 0.7))
ten.add(pos="bottom", height=4)
ten.add(pos="bottom", height=0.5, hspace=0.1)
ten.add(pos="top", height=1, hspace=0.1)
ten.axs(0).plot([0, 1])
ten.show()
../_images/track_types_grid_spec_3_0.png
[3]:
ten = tc.tenon(figsize=(5, 0.7))
ten.add(pos="bottom", height=4)
ten.add(pos="bottom", height=0.5, hspace=0.1)
ten.add(pos="top", height=1, hspace=0.1)

ten.axs(0).plot([0, 1])
ten.axs(1).bar(x=[0, 1, 2], height=[3, 2, 4])

# tc.savefig('tenon_test.pdf')
[3]:
<BarContainer object of 3 artists>
../_images/track_types_grid_spec_4_1.png

trackc.make_spec#

[4]:
fig, axs = tc.make_spec(figsize=(6, 3), height_ratios=[1, 1, 1], wspace=0.1)
axs[0].plot([1, 2])
axs[2].bar(x=[0, 1, 2], height=[3, 2, 4])
[4]:
<BarContainer object of 3 artists>
../_images/track_types_grid_spec_6_1.png
[5]:
fig, axs = tc.make_spec(figsize=(6, 3), width_ratios=[1, 1, 1], wspace=0.1)
axs[0].plot([1, 2])
axs[2].bar(x=[0, 1, 2], height=[3, 2, 4])
[5]:
<BarContainer object of 3 artists>
../_images/track_types_grid_spec_7_1.png