Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
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
14 changes: 0 additions & 14 deletions examples/gallery/symbols/patterns.py
Original file line number Diff line number Diff line change
Expand Up @@ -5,20 +5,6 @@
In addition to colors, PyGMT also allows using bit and hachure patterns to fill symbols,
polygons, and other areas, via the ``fill`` parameter or similar parameters.

Example method parameters that support bit and hachure patterns include:

- :meth:`pygmt.Figure.coast`: Land and water masses via ``land`` and ``water``
- :meth:`pygmt.Figure.histogram`: Histogram bars via ``fill``
- :meth:`pygmt.Figure.meca`: Focal mechanisms via ``compression_fill`` and
``extension_fill``
- :meth:`pygmt.Figure.plot`: Symbols and polygons via ``fill``
- :meth:`pygmt.Figure.rose`: Histogram sectors via ``fill``
- :meth:`pygmt.Figure.solar`: Day-light terminators via ``fill``
- :meth:`pygmt.Figure.ternary`: Symbols via ``fill``
- :meth:`pygmt.Figure.velo`: Uncertainty wedges and velocity error ellipses via
``uncertainty_fill``
- :meth:`pygmt.Figure.wiggle`: Anomalies via ``positive_fill`` and ``negative_fill``
Comment on lines -8 to -20

Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

As any fill-like parameters accept Pattern, I feel it makes little sense to list so many plotting methods here.


GMT provides 90 predefined 1-bit patterns, which are numbered from 1 to 90. In addition,
custom 1-, 8-, or 24-bit image raster files can also be used as patterns.

Expand Down
6 changes: 3 additions & 3 deletions pygmt/src/fill_between.py
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@
from pygmt.clib import Session
from pygmt.exceptions import GMTValueError
from pygmt.helpers import build_arg_list, fmt_docstring
from pygmt.params import Axis, Frame
from pygmt.params import Axis, Frame, Pattern

__doctest_skip__ = ["fill_between"]

Expand All @@ -22,8 +22,8 @@ def fill_between(
y: Sequence[float],
y2: float | Sequence[float] = 0,
x2: Sequence[float] | None = None,
fill: str | None = None,
fill2: str | None = None,
fill: str | Pattern | None = None,
fill2: str | Pattern | None = None,
pen: str | None = None,
pen2: str | None = None,
label: str | None = None,
Expand Down
6 changes: 3 additions & 3 deletions pygmt/src/grdview.py
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@
is_given,
use_alias,
)
from pygmt.params import Axis, Frame
from pygmt.params import Axis, Frame, Pattern
from pygmt.src.grdinfo import grdinfo

__doctest_skip__ = ["grdview"]
Expand Down Expand Up @@ -127,10 +127,10 @@ def grdview(
nan_transparent: bool = False,
monochrome: bool = False,
contour_pen: str | None = None,
mesh_fill: str | None = None,
mesh_fill: str | Pattern | None = None,
mesh_pen: str | None = None,
plane: float | bool = False,
facade_fill: str | None = None,
facade_fill: str | Pattern | None = None,
facade_pen: str | None = None,
projection: str | None = None,
smooth: int | None = None,
Expand Down
4 changes: 2 additions & 2 deletions pygmt/src/histogram.py
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@
kwargs_to_strings,
use_alias,
)
from pygmt.params import Axis, Frame
from pygmt.params import Axis, Frame, Pattern

__doctest_skip__ = ["histogram"]

Expand Down Expand Up @@ -44,7 +44,7 @@ def histogram(
bar_offset: float | str | None = None,
cmap: str | bool = False,
pen: str | None = None,
fill: str | None = None,
fill: str | Pattern | None = None,
horizontal: bool = False,
center: bool = False,
out_range: Literal["first", "last", "both"] | None = None,
Expand Down
6 changes: 3 additions & 3 deletions pygmt/src/meca.py
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@
fmt_docstring,
use_alias,
)
from pygmt.params import Axis, Frame
from pygmt.params import Axis, Frame, Pattern
from pygmt.src._common import _FocalMechanismConvention


Expand Down Expand Up @@ -129,8 +129,8 @@ def meca(
plot_latitude: float | Sequence[float] | None = None,
event_name: str | Sequence[str] | None = None,
cmap: str | None = None,
extension_fill: str | None = None,
compression_fill: str | None = None,
extension_fill: str | Pattern | None = None,
compression_fill: str | Pattern | None = None,
pen: str | None = None,
no_clip: bool = False,
projection: str | None = None,
Expand Down
3 changes: 2 additions & 1 deletion pygmt/src/paragraph.py
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,7 @@
is_nonstr_iter,
non_ascii_to_octal,
)
from pygmt.params import Pattern

__doctest_skip__ = ["paragraph"]

Expand All @@ -33,7 +34,7 @@ def paragraph(
font: str | None = None,
angle: float | None = None,
justify: AnchorCode | None = None,
fill: str | None = None,
fill: str | Pattern | None = None,
pen: str | None = None,
alignment: Literal["left", "center", "right", "justified"] = "left",
tab_width: int = 4,
Expand Down
4 changes: 2 additions & 2 deletions pygmt/src/solar.py
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@
from pygmt.clib import Session
from pygmt.exceptions import GMTValueError
from pygmt.helpers import build_arg_list, fmt_docstring
from pygmt.params import Axis, Frame
from pygmt.params import Axis, Frame, Pattern

__doctest_skip__ = ["solar"]

Expand All @@ -20,7 +20,7 @@ def solar(
self,
terminator: Literal["astronomical", "civil", "day_night", "nautical"] = "day_night",
terminator_datetime=None,
fill: str | None = None,
fill: str | Pattern | None = None,
pen: str | None = None,
projection: str | None = None,
region: Sequence[float | str] | str | None = None,
Expand Down
4 changes: 2 additions & 2 deletions pygmt/src/ternary.py
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@
from pygmt.clib import Session
from pygmt.exceptions import GMTValueError
from pygmt.helpers import build_arg_list, fmt_docstring, use_alias
from pygmt.params import Axis, Frame
from pygmt.params import Axis, Frame, Pattern
from pygmt.params.frame import _Axes


Expand Down Expand Up @@ -113,7 +113,7 @@ def ternary(
self,
data: PathLike | TableLike,
cmap: str | bool = False,
fill: str | None = None,
fill: str | Pattern | None = None,
width: float | str | None = None,
pen: str | None = None,
alabel: str | None = None,
Expand Down
4 changes: 2 additions & 2 deletions pygmt/src/text.py
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@
non_ascii_to_octal,
use_alias,
)
from pygmt.params import Axis, Frame
from pygmt.params import Axis, Frame, Pattern


@fmt_docstring
Expand All @@ -40,7 +40,7 @@ def text( # ruff: ignore[too-many-branches, too-many-statements]
text: str | StringArrayTypes | None = None,
angle: float | Sequence[float] | bool = False,
font: str | StringArrayTypes | bool = False,
fill: str | None = None,
fill: str | Pattern | None = None,
pen: str | None = None,
justify: bool | AnchorCode | Sequence[AnchorCode] | None = None,
offset: Sequence[float | str] | str | None = None,
Expand Down
6 changes: 3 additions & 3 deletions pygmt/src/wiggle.py
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@
from pygmt.alias import Alias, AliasSystem
from pygmt.clib import Session
from pygmt.helpers import build_arg_list, fmt_docstring, use_alias
from pygmt.params import Axis, Frame, Position
from pygmt.params import Axis, Frame, Pattern, Position
from pygmt.src._common import _parse_position


Expand All @@ -34,8 +34,8 @@ def wiggle(
position: Position | Sequence[float | str] | AnchorCode | None = None,
length: float | str | None = None,
label_alignment: Literal["left", "right"] | None = None,
positive_fill: str | None = None,
negative_fill: str | None = None,
positive_fill: str | Pattern | None = None,
negative_fill: str | Pattern | None = None,
projection: str | None = None,
region: Sequence[float | str] | str | None = None,
frame: Frame | Axis | Literal["none"] | str | Sequence[str] | bool = False,
Expand Down
Loading