Skip to content

Commit

Permalink
Add more area plotting tests
Browse files Browse the repository at this point in the history
  • Loading branch information
djhoese committed Aug 27, 2024
1 parent 979e6b2 commit 8002a7a
Showing 1 changed file with 7 additions and 5 deletions.
12 changes: 7 additions & 5 deletions pyresample/_formatting_html.py
Original file line number Diff line number Diff line change
Expand Up @@ -79,12 +79,14 @@ def plot_area_def(area: Union['geom.AreaDefinition', 'geom.SwathDefinition'], #
If None (default) plot is just shown.
features: Series of string names of cartopy features to add to the plot.
Can be lowercase or uppercase names of the features, for example,
"land", "coastline", "borders", or any other feature available from
``cartopy.feature``. If None (default), then land, coastline, borders,
and ocean are used.
"land", "coastline", "borders", "ocean", or any other feature
available from ``cartopy.feature``. If None (default), then land,
coastline, and borders are used.
Returns:
svg or png image as string.
svg or png image as string or ``None`` when no format is provided
in which case the plot is shown interactively.
"""
import base64
from io import BytesIO, StringIO
Expand All @@ -110,7 +112,7 @@ def plot_area_def(area: Union['geom.AreaDefinition', 'geom.SwathDefinition'], #
raise NotImplementedError("Only AreaDefinition and SwathDefinition objects can be plotted")

Check warning on line 112 in pyresample/_formatting_html.py

View check run for this annotation

Codecov / codecov/patch

pyresample/_formatting_html.py#L112

Added line #L112 was not covered by tests

if features is None:
features = ("ocean", "land", "coastline", "borders")
features = ("land", "coastline", "borders")

for feat_name in features:
feat_obj = getattr(cartopy.feature, feat_name.upper())
Expand Down

0 comments on commit 8002a7a

Please sign in to comment.