Beispiel #1
0
def test_graphics():
    f = Figure(data=None, position=None)

    f.add_image(filename='', width=r'0.8\textwidth', placement=r'\centering')

    f.add_caption(caption='')
    repr(f)

    # Subfigure
    s = SubFigure(data=None, position=None, width=r'0.45\linewidth')

    s.add_image(filename='', width='r\linewidth', placement=None)

    s.add_caption(caption='')
    repr(s)

    # Matplotlib
    plot = Figure(data=None, position=None)

    x = [0, 1, 2, 3, 4, 5, 6]
    y = [15, 2, 7, 1, 5, 6, 9]

    pyplot.plot(x, y)

    plot.add_plot(width=r'0.8\textwidth', placement=r'\centering')
    plot.add_caption(caption='I am a caption.')
    repr(plot)

    # StandAloneGraphic
    stand_alone_graphic = StandAloneGraphic(
        filename='', image_options=r"width=0.8\textwidth")
    repr(stand_alone_graphic)
Beispiel #2
0
def test_graphics():
    f = Figure(data=None, position=None)

    f.add_image(filename='', width=r'0.8\textwidth', placement=r'\centering')

    f.add_caption(caption='')
    repr(f)

    # Subfigure
    s = SubFigure(data=None, position=None, width=r'0.45\linewidth')

    s.add_image(filename='', width='r\linewidth',
                placement=None)

    s.add_caption(caption='')
    repr(s)

    # Matplotlib
    plot = Figure(data=None, position=None)

    x = [0, 1, 2, 3, 4, 5, 6]
    y = [15, 2, 7, 1, 5, 6, 9]

    pyplot.plot(x, y)

    plot.add_plot(width=r'0.8\textwidth', placement=r'\centering')
    plot.add_caption(caption='I am a caption.')
    repr(plot)
Beispiel #3
0
def test_graphics():
    f = Figure(data=None, position=None)

    f.add_image(filename="", width=r"0.8\textwidth", placement=r"\centering")

    f.add_caption(caption="")

    # Subfigure
    s = SubFigure(data=None, position=None, width=r"0.45\linewidth", separate_paragraph=False)

    s.add_image(filename="", width="r\linewidth", placement=None)

    s.add_caption(caption="")

    # Matplotlib
    plot = Figure(data=None, position=None)

    x = [0, 1, 2, 3, 4, 5, 6]
    y = [15, 2, 7, 1, 5, 6, 9]

    pyplot.plot(x, y)

    plot.add_plot(width=r"0.8\textwidth", placement=r"\centering")
    plot.add_caption(caption="I am a caption.")
Beispiel #4
0
def plot_show(caption, width=r'0.5\textwidth', *args, **kwargs):
    fig = Figure(position='htbp')
    fig.add_plot(width=NoEscapeStr(width), *args, **kwargs)
    fig.add_caption(NoEscapeStr(caption))
    return fig