예제 #1
0
def test_reverse_axes_ygrid():
    testgrid = trendvis.YGrid([2, 1])
    lim0 = testgrid.fig.axes[0].get_xlim()
    lim1 = testgrid.fig.axes[1].get_xlim()
    mainlim = testgrid.fig.axes[0].get_ylim()

    testgrid.reverse_xaxis()
    testgrid.reverse_yaxis()

    assert_equal(lim0, testgrid.fig.axes[0].get_xlim()[::-1])
    assert_equal(lim1, testgrid.fig.axes[1].get_xlim()[::-1])
    assert_equal(mainlim, testgrid.fig.axes[1].get_ylim()[::-1])
예제 #2
0
def test_get_axes_ygrid():
    testgrid = trendvis.YGrid([2, 1])
    testgrid.make_twins([0])

    assert_equal(testgrid.get_axis(0, is_twin=True), testgrid.axes[2][0])
예제 #3
0
def test_ygrid_multitwin():
    testgrid = trendvis.YGrid([2, 1])
    testgrid.make_twins([0, 1])
    testgrid.make_twins(3)
예제 #4
0
def test_ygrid_twins():
    testgrid = trendvis.YGrid([2, 2, 1], alternate_sides=False, yratios=[2, 1])
    testgrid.make_twins([0, 2])
    testgrid.cleanup_grid()
예제 #5
0
def test_ygrid_clean():
    testgrid = trendvis.YGrid([4, 6])
    testgrid.cleanup_grid()
예제 #6
0
def test_ygrid_init():
    trendvis.YGrid([2, 3, 1, 2])
예제 #7
0
def test_ygrid_frame():
    testgrid = trendvis.YGrid([1, 2, 1], yratios=[1, 1])
    testgrid.cleanup_grid()
    testgrid.draw_frame()
예제 #8
0
def test_ygrid_xlabels():
    testgrid = trendvis.YGrid([1, 2, 1])
    testgrid.set_xlabels(['0', '1', None])
예제 #9
0
def test_ygrid_cutout():
    testgrid = trendvis.YGrid([1], yratios=[1, 2])
    testgrid.cleanup_grid()
    testgrid.draw_cutout()