Example #1
0
def test_matplotlib_with_title():
    return PlotBlock(pd.Series([1, 2, 3]).plot(), title="Image title")
Example #2
0
def test_matplotlib_explicit_dimensions():
    return PlotBlock(pd.Series([1, 2, 3]).plot(), width="99px", height="33px")
Example #3
0
def test_matplotlib_no_bbox_tighten():
    return PlotBlock(pd.Series([1, 2, 3]).plot(), bbox_inches=None)
Example #4
0
def test_matplotlib():
    return PlotBlock(pd.Series([1, 2, 3]).plot())
Example #5
0
def test_create_PlotBlock():
    f = plt.figure()
    b = PlotBlock(f)
    assert len(b._img_data) > 0
    assert b._mime_type == 'png'
Example #6
0
def test_create_PlotBlock_with_bbox_inches_none():
    f = plt.figure()
    b = PlotBlock(f, bbox_inches=None)
    assert len(b._img_data) > 0
    assert b._mime_type == 'png'