From f8d2a9c85700d65294171247142a83f3b9ff0914 Mon Sep 17 00:00:00 2001 From: Dongdong Tian Date: Sun, 21 Jun 2026 11:02:33 +0800 Subject: [PATCH] Figure.pygmtlogo: Extend the region to get rid of the 'no_clip' parameter --- pygmt/src/pygmtlogo.py | 15 +++++---------- ...est_pygmtlogo_design_circle-horizontal.png.dvc | 4 ++-- .../test_pygmtlogo_design_circle-vertical.png.dvc | 4 ++-- ...st_pygmtlogo_design_hexagon-horizontal.png.dvc | 4 ++-- ...test_pygmtlogo_design_hexagon-vertical.png.dvc | 4 ++-- ...est_pygmtlogo_wordmark_vertical_circle.png.dvc | 4 ++-- 6 files changed, 15 insertions(+), 20 deletions(-) diff --git a/pygmt/src/pygmtlogo.py b/pygmt/src/pygmtlogo.py index 66dd303f20a..b24bf54e240 100644 --- a/pygmt/src/pygmtlogo.py +++ b/pygmt/src/pygmtlogo.py @@ -33,10 +33,11 @@ def _create_logo( # noqa: PLR0915 # Helpful definitions size = 4 proj = "x1c" + factor = 1.2 # Extension factor for the region region = { - "horizontal": [-size, size * 7.0, -size, size], - "vertical": [-size, size, -size * 1.75, size], - "none": [-size, size, -size, size], + "horizontal": [-size * factor, size * 7.0, -size * factor, size * factor], + "vertical": [-size * factor, size * factor, -size * 2.0, size * factor], + "none": [-size * factor, size * factor, -size * factor, size * factor], }[wordmark] # Rotation around z-axis by 30 degrees counter-clockwise placed in the center. @@ -96,7 +97,6 @@ def _create_logo( # noqa: PLR0915 "y": -size * (1.375 if shape == "circle" else 1.5), "justify": "ML", "font": f"{fontsize}c,{font}", - "no_clip": True, # Needed because x