Skip to content
Merged
Changes from 1 commit
Commits
Show all changes
85 commits
Select commit Hold shift + click to select a range
eec0fb7
Initial implemention of the Position class
seisman Nov 16, 2025
69d4d42
Merge branch 'main' into params/position
seisman Nov 20, 2025
539f66f
Fix styling
seisman Nov 20, 2025
97f015f
Add tests and improve docstrings
seisman Nov 23, 2025
854804e
Add to API doc
seisman Nov 23, 2025
6b55dde
Add an inline doctest
seisman Nov 23, 2025
3d629cb
position is not required
seisman Nov 23, 2025
576b822
Default to plotcoords
seisman Nov 23, 2025
f54bec9
Updates
seisman Nov 23, 2025
5a2e20b
Merge branch 'main' into params/position
seisman Nov 24, 2025
2c59b7f
Improve the checking in Figure.logo
seisman Nov 24, 2025
d0b62ec
Merge branch 'main' into params/position
seisman Nov 24, 2025
fe18c87
Improve docstrings
seisman Nov 24, 2025
038161b
Improve docstrings
seisman Nov 24, 2025
a6e75bc
Improve docstrings
seisman Nov 25, 2025
3ec8c06
Improve docstrings
seisman Nov 25, 2025
339ce00
Improve docstrings
seisman Nov 25, 2025
4d616de
Revert changes in logo.py
seisman Nov 25, 2025
ad9e0aa
Simplify tests
seisman Nov 25, 2025
b084e5f
Validate values
seisman Nov 25, 2025
d4ad6e0
type will be validated in the Alias System
seisman Nov 25, 2025
7dc37bd
Use the image from the GMT docs
seisman Nov 25, 2025
bfecb2d
Fix width and alignment
seisman Nov 25, 2025
18b90b3
Improve docstrings
seisman Nov 25, 2025
6b1b5bc
Remove unneeded blank lines
seisman Nov 25, 2025
1eae742
Improve docstrings
seisman Nov 25, 2025
721b46f
Validate anchor code
seisman Nov 25, 2025
669b16d
Merge branch 'main' into params/position
seisman Nov 26, 2025
2a38111
Merge branch 'main' into params/position
seisman Nov 26, 2025
0f9ed6c
offset can be a single value
seisman Nov 26, 2025
7d1b076
Merge branch 'main' into params/position
seisman Nov 29, 2025
a779431
Merge branch 'main' into params/position
seisman Dec 1, 2025
2a9cc92
Merge branch 'main' into params/position
seisman Dec 4, 2025
10a0dfb
Use is_nonstr_iter to check the location parameter
seisman Dec 4, 2025
6f1c2c4
Merge remote-tracking branch 'origin/params/position' into params/pos…
seisman Dec 4, 2025
c27213f
Fix a typo [skip ci]
seisman Dec 4, 2025
d47aaeb
Fix a typo [skip ci]
seisman Dec 4, 2025
7fc6ffc
Fix the wrong logic in checking location
seisman Dec 4, 2025
d82f4ba
Add a tests for passing a single value to offset
seisman Dec 4, 2025
5d29e66
Merge branch 'main' into params/position
seisman Dec 5, 2025
563b5a1
Merge branch 'main' into params/position
seisman Dec 5, 2025
0ec021b
Merge branch 'main' into params/position
seisman Dec 6, 2025
ff23ac8
Merge branch 'main' into params/position
seisman Dec 6, 2025
620da52
Figure.legend: Refactor using the new alias system
seisman Aug 10, 2025
c9c4222
Rename position to refpoint
seisman Dec 7, 2025
0064cde
Fix formatting
seisman Dec 7, 2025
d702ce6
Improve Figure.legend and tests
seisman Dec 7, 2025
ceb345e
Improve docstrings of width/height
seisman Dec 7, 2025
9922da8
Add one test for width/height
seisman Dec 7, 2025
c917192
Fix checking of box
seisman Dec 7, 2025
cf11c13
Update the position argument in gallery examples
seisman Dec 7, 2025
816d8b9
Rename spacing to line_spacing
seisman Dec 7, 2025
7ff9f6a
Fix one more spacing to line_spacing
seisman Dec 7, 2025
82426cd
Improve docstrings
seisman Dec 7, 2025
cdf6377
Fix typos
seisman Dec 7, 2025
0c276dd
Remove the test_legend_position test because it's already covered in …
seisman Dec 7, 2025
5bc0bb1
Check compatibility with old syntax
seisman Dec 7, 2025
90c7ea2
Merge branch 'main' into params/position
seisman Dec 8, 2025
9a19c1a
Merge branch 'main' into params/position
seisman Dec 8, 2025
ff6392d
Update pygmt/params/position.py
seisman Dec 9, 2025
2310b22
Update pygmt/params/position.py [skip ci]
seisman Dec 9, 2025
a3185e8
Fix styling
seisman Dec 9, 2025
e153ebf
Rename type to cstype
seisman Dec 9, 2025
ed31e0f
Merge branch 'main' into params/position
seisman Dec 9, 2025
be36403
Merge branch 'params/position' into refactor/legend
seisman Dec 9, 2025
5bf51be
Fix typos
seisman Dec 9, 2025
b45fa78
Fix CM to MC
seisman Dec 9, 2025
3480fd1
Merge branch 'main' into params/position
seisman Dec 10, 2025
e0b2071
Merge branch 'params/position' into refactor/legend
seisman Dec 10, 2025
36f2519
Fix typos
seisman Dec 10, 2025
b58c7ff
Merge branch 'main' into refactor/legend
seisman Dec 11, 2025
19e00c4
Update pygmt/tests/test_legend.py [skip ci]
seisman Dec 11, 2025
2f58300
Update pygmt/tests/test_legend.py [skip ci]
seisman Dec 11, 2025
ebe510e
Merge branch 'main' into refactor/legend
seisman Dec 12, 2025
1b4b78d
Merge branch 'main' into refactor/legend
seisman Dec 13, 2025
698cb64
Merge branch 'main' into refactor/legend
seisman Dec 18, 2025
5165727
Refactor with the _parse_position function
seisman Dec 18, 2025
a3176e6
Use shortcut syntax for position
seisman Dec 18, 2025
bbc7b7a
Merge branch 'main' into refactor/legend
seisman Dec 18, 2025
b22bb9f
Merge branch 'main' into refactor/legend
seisman Dec 18, 2025
25eb225
Improve a few comments
seisman Dec 18, 2025
bca06d8
Simplify a few tests
seisman Dec 18, 2025
1f41174
Merge branch 'main' into refactor/legend
seisman Dec 18, 2025
7ce59a9
Fix typos
seisman Dec 20, 2025
163b71f
Merge branch 'main' into refactor/legend
seisman Dec 20, 2025
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Prev Previous commit
Next Next commit
Revert changes in logo.py
  • Loading branch information
seisman committed Nov 25, 2025
commit 4d616de507fdd4e9f0b1d331f1b626bac3981960
36 changes: 5 additions & 31 deletions pygmt/src/logo.py
Original file line number Diff line number Diff line change
Expand Up @@ -7,17 +7,14 @@

from pygmt.alias import Alias, AliasSystem
from pygmt.clib import Session
from pygmt.exceptions import GMTInvalidInput
from pygmt.helpers import build_arg_list, fmt_docstring
from pygmt.params import Box, Position
from pygmt.helpers import build_arg_list, fmt_docstring, use_alias
from pygmt.params import Box


@fmt_docstring
def logo( # noqa: PLR0913
@use_alias(D="position")
def logo(
self,
position: Position | None = None,
width: float | str | None = None,
height: float | str | None = None,
projection: str | None = None,
region: Sequence[float | str] | str | None = None,
style: Literal["standard", "url", "no_label"] = "standard",
Expand All @@ -39,12 +36,7 @@ def logo( # noqa: PLR0913

Full GMT docs at :gmt-docs:`gmtlogo.html`.

**Aliases:**

.. hlist::
:columns: 3

- D = position, **+w**: width, **+h**: height
{aliases}
- F = box
- J = projection
- R = region
Expand Down Expand Up @@ -80,25 +72,7 @@ def logo( # noqa: PLR0913
"""
self._activate_figure()

if isinstance(position, str) and any(v is not None for v in (width, height)):
msg = (
"Parameter 'position' is given with a raw GMT CLI syntax, and conflicts "
"with parameters 'height', and 'width'. Please refer to the documentation "
"for the recommended usage."
)
raise GMTInvalidInput(msg)

# width and height are mutually exclusive.
if width is not None and height is not None:
msg = "Cannot specify both width and height."
raise GMTInvalidInput(msg)

aliasdict = AliasSystem(
D=[
Alias(position, name="position"),
Alias(width, name="width", prefix="+w"),
Alias(height, name="height", prefix="+h"),
],
F=Alias(box, name="box"),
S=Alias(
style, name="style", mapping={"standard": "l", "url": "u", "no_label": "n"}
Expand Down
Loading