示例#1
0
def test_reverse_axes_xgrid():
    testgrid = trendvis.XGrid([2, 1])
    lim0 = testgrid.fig.axes[0].get_ylim()
    lim1 = testgrid.fig.axes[1].get_ylim()
    mainlim = testgrid.fig.axes[0].get_xlim()

    testgrid.reverse_yaxis()
    testgrid.reverse_xaxis()

    assert_equal(lim0, testgrid.fig.axes[0].get_ylim()[::-1])
    assert_equal(lim1, testgrid.fig.axes[1].get_ylim()[::-1])
    assert_equal(mainlim, testgrid.fig.axes[1].get_xlim()[::-1])
示例#2
0
def test_get_axes_xgrid():
    testgrid = trendvis.XGrid([2, 1])
    testgrid.make_twins([0])

    assert_equal(testgrid.get_axis(0, is_twin=True), testgrid.axes[2][0])
示例#3
0
def test_xgrid_multitwin():
    testgrid = trendvis.XGrid([2, 1])
    testgrid.make_twins([0, 1])
    testgrid.make_twins(3)
示例#4
0
def test_xgrid_twins():
    testgrid = trendvis.XGrid([2, 5, 1], alternate_sides=False, xratios=[2, 1])
    testgrid.make_twins([0, 2])
    testgrid.cleanup_grid()
示例#5
0
def test_xgrid_clean():
    testgrid = trendvis.XGrid([2, 3, 1, 2])
    testgrid.cleanup_grid()
示例#6
0
def test_xgrid_init():
    trendvis.XGrid([2, 3, 1, 2])
示例#7
0
def test_xgrid_frame():
    testgrid = trendvis.XGrid([1, 2, 1], xratios=[1, 1])
    testgrid.cleanup_grid()
    testgrid.draw_frame()
示例#8
0
def test_xgrid_ylabels():
    testgrid = trendvis.XGrid([1, 2])
    testgrid.set_ylabels(['0', '1'])
示例#9
0
def test_xgrid_cutout():
    testgrid = trendvis.XGrid([1], xratios=[1, 2])
    testgrid.cleanup_grid()
    testgrid.draw_cutout()