From 86715f5b336710110ce55469d92b8361f8b2c402 Mon Sep 17 00:00:00 2001 From: Dongdong Tian Date: Thu, 9 Oct 2025 11:23:31 +0800 Subject: [PATCH] Figure: Remove the deprecated _preprocess method [Deprecated since v0.16.0] --- pygmt/figure.py | 16 ---------------- 1 file changed, 16 deletions(-) diff --git a/pygmt/figure.py b/pygmt/figure.py index 0658b8a5b33..56ad2c3d5cf 100644 --- a/pygmt/figure.py +++ b/pygmt/figure.py @@ -4,7 +4,6 @@ import base64 import os -import warnings from pathlib import Path from tempfile import TemporaryDirectory from typing import Literal, overload @@ -120,21 +119,6 @@ def _activate_figure(self) -> None: with Session() as lib: lib.call_module(module="figure", args=[self._name, fmt]) - # TODO(PyGMT>=v0.18.0): Remove the _preprocess method. - def _preprocess(self, **kwargs): - """ - Call the ``figure`` module before each plotting command to ensure we're plotting - to this particular figure. - """ - self._activate_figure() - warnings.warn( - "The Figure._preprocess() method is deprecated since v0.16.0 and will be " - "removed in v0.18.0. Use Figure._activate_figure() instead.", - FutureWarning, - stacklevel=2, - ) - return kwargs - @property def region(self) -> np.ndarray: """