From 8002a7a3482b99afad01e74e392aedf24edf9d05 Mon Sep 17 00:00:00 2001 From: David Hoese Date: Tue, 27 Aug 2024 11:15:06 -0500 Subject: [PATCH] Add more area plotting tests --- pyresample/_formatting_html.py | 12 +++++++----- 1 file changed, 7 insertions(+), 5 deletions(-) diff --git a/pyresample/_formatting_html.py b/pyresample/_formatting_html.py index b4800aad..d015f298 100644 --- a/pyresample/_formatting_html.py +++ b/pyresample/_formatting_html.py @@ -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 @@ -110,7 +112,7 @@ def plot_area_def(area: Union['geom.AreaDefinition', 'geom.SwathDefinition'], # raise NotImplementedError("Only AreaDefinition and SwathDefinition objects can be plotted") 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())