Object-Oriented API#

Build memes step-by-step or with method chaining using the Meme class.

Step-by-Step Construction#

Create a Meme, set text on each position, then render.

from memeplotlib import Meme

m = Meme("buzz")
m.top("memes")
m.bottom("memes everywhere")
fig, ax = m.render()
plot oo api

Method Chaining#

The fluent interface lets you build a meme in a single expression.

Meme("doge").top("such code").bottom("very bug").render()
plot oo api
(<Figure size 1200x1200 with 1 Axes>, <Axes: >)

Constructor Shorthand#

Text lines can also be passed directly to the constructor.

m = Meme("buzz", "memes", "memes everywhere")
m.render()
plot oo api
(<Figure size 1200x912.548 with 1 Axes>, <Axes: >)

Total running time of the script: (0 minutes 0.883 seconds)

Gallery generated by Sphinx-Gallery