Global Configuration#

Set project-wide defaults with config so every meme inherits the same look.

Changing Defaults#

Any attribute on config becomes the new default for all subsequent meme() and Meme calls.

import memeplotlib as memes

memes.config.font = "comic"
memes.config.color = "yellow"
memes.config.fontsize = 120
memes.config.style = "none"

memes.meme("buzz", "custom defaults", "applied everywhere", show=False)
plot configuration
findfont: Font family ['Comic Sans MS'] not found. Falling back to DejaVu Sans.
/home/runner/work/memeplotlib/memeplotlib/src/memeplotlib/_rendering.py:410: UserWarning: Font 'comic' not found. Using fallback font. Install 'comic' for best results.
  _draw_meme_text(
findfont: Font family 'Comic Sans MS' not found.
findfont: Font family 'Comic Sans MS' not found.
findfont: Font family 'Comic Sans MS' not found.
findfont: Font family 'Comic Sans MS' not found.

(<Figure size 1200x912.548 with 1 Axes>, <Axes: >)

Reset to defaults for the rest of the examples.

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

Gallery generated by Sphinx-Gallery