Skip to main content
Ctrl+K
tephpy 0.1.0.dev116 documentation - Home tephpy 0.1.0.dev116 documentation - Home
  • Tutorials
  • How-To Guides
  • Explanation
  • Reference
  • Developer Guide
  • GitHub
  • Tutorials
  • How-To Guides
  • Explanation
  • Reference
  • Developer Guide
  • GitHub

Section Navigation

  • tephpy
    • tephpy.calc
    • tephpy.exceptions
    • tephpy.io
      • tephpy.io.igra
      • tephpy.io.wyoming
    • tephpy.plotting
      • tephpy.plotting.axes
      • tephpy.plotting.barbs
      • tephpy.plotting.isopleths
      • tephpy.plotting.logo
      • tephpy.plotting.shading
    • tephpy.sounding
    • tephpy.transforms
  • Command Line
  • Configuration Options
  • Glossary
  • Changelog
  • Reference
  • tephpy
  • tephpy.plotting
  • tephpy.plotting.logo

tephpy.plotting.logo#

Place the tephpy logo on a figure or an axes.

The masters under _static are byte-identical copies of the published brand bundle (logo spec §3.2), kept that way by a drift guard in tests/plotting/test_logo.py. Sizing is a height in inches and is dpi-independent (logo spec §3.3); placement follows the legend vocabulary (logo spec §3.4).

Functions#

add_logo(→ matplotlib.offsetbox.AnnotationBbox)

Draw the tephpy logo on a figure or an axes.

Module Contents#

tephpy.plotting.logo.add_logo(target: matplotlib.figure.Figure | matplotlib.axes.Axes | None = None, *, form: str = 'lockup', size: str | float = 'small', theme: str = 'auto', loc: str | tuple[float, float] = 'lower left', pad: float | None = None, zorder: float | None = None, **kwargs: Any) → matplotlib.offsetbox.AnnotationBbox[source]#

Draw the tephpy logo on a figure or an axes.

The logo is an matplotlib.offsetbox.AnnotationBbox anchored in the target’s own fraction coordinates, so a figure target places it against the figure edges and an axes target against the axes edges, exactly as matplotlib.axes.Axes.legend() does (logo spec §3.4). Its rendered height is the number of inches asked for whatever the figure dpi (logo spec §3.3).

Parameters:
targetmatplotlib.figure.Figure or matplotlib.axes.Axes, optional

What to brand, and what the position is relative to. None takes the current figure.

formstr, optional

Which mark to draw: "lockup", "stacked" or "icon".

sizestr or float, optional

A preset, "small" or "large", or an explicit height in inches.

themestr, optional

Which variant to draw: "auto", "light" or "dark". The name is the background the logo is drawn on, so "dark" is the variant for a dark background. "auto" reads the target’s facecolor.

locstr or tuple of float, optional

A matplotlib.axes.Axes.legend() placement string, or an (x, y) pair in the target’s fraction coordinates giving the logo’s lower-left corner.

padfloat, optional

Points between the logo and the target’s edge. None takes LOGO_PAD. Ignored when loc is a pair, but still validated: add_logo(ax, loc=(0.5, 0.5), pad=float("nan")) raises.

zorderfloat, optional

Draw order. None takes LOGO_ZORDER, which is above lines, text and legends.

**kwargsAny

Passed through to matplotlib.offsetbox.OffsetImage: alpha, filternorm, filterrad, interpolation and resample.

Returns:
matplotlib.offsetbox.AnnotationBbox

The artist, already added to the target, for restyling or removal.

Raises:
TypeError

If target is neither a figure nor an axes, if loc is neither a placement string nor a pair of floats, if pad or zorder is not a real number (e.g., a list), or if a keyword is not a matplotlib.offsetbox.OffsetImage option.

ValueError

If form, size, theme or loc names something that does not exist, if size is not a positive finite height, if a loc pair holds a non-finite coordinate, if pad or zorder is a string, or if pad or zorder is not finite.

previous

tephpy.plotting.isopleths

next

tephpy.plotting.shading

On this page
  • Functions
  • Module Contents
    • add_logo()
Show Source

© Copyright 2026, tephpy Contributors.

Created using Sphinx 9.1.0.

Built with the PyData Sphinx Theme 0.20.0.