TNO Intern

Commit 653b8fc0 authored by Arjo Segers's avatar Arjo Segers
Browse files

Use cartopy for map plots.

parent c0e8bdb0
Loading
Loading
Loading
Loading
+15 −7
Original line number Diff line number Diff line
@@ -18,6 +18,9 @@
# 2023, Lewis Blake, Arjo Segers
#   Formatted using "black".
#
# 2024-01, Arjo Segers
#   Use new plotting routines based on cartopy.
#

########################################################################
###
@@ -505,19 +508,21 @@ class CSO_Catalogue(CSO_CatalogueBase):
                            label = "%s [%s]" % (long_name, units)

                            # map properties:
                            bmp = dict(resolution="i", countries=True, domain=domain, title=title)
                            bmp = dict(countries=True)
                            bmp.update(bmp_kwargs)

                            # create map figure:
                            fig = cso_plot.QuickMap(
                            fig = cso_plot.QuickPat(
                                values,
                                xx=xx,
                                yy=yy,
                                vmin=vmin,
                                vmax=vmax,
                                cmap=dict(colors=colors, color_bad=color_nan),
                                cmap=dict(colors=colors),  # color_bad=color_nan),
                                bmp=bmp,
                                domain=domain,
                                cbar=dict(label=label),
                                title=title,
                                figsize=figsize,
                            )
                            # save:
@@ -862,11 +867,11 @@ class CSO_SimCatalogue(CSO_CatalogueBase):
                            label = "%s [%s]" % (long_name, units)

                            # map properties:
                            bmp = dict(resolution="i", countries=True, domain=domain, title=title)
                            bmp = dict(countries=True)
                            bmp.update(bmp_kwargs)

                            # create map figure:
                            fig = cso_plot.QuickMap(
                            fig = cso_plot.QuickPat(
                                values,
                                xx=xx,
                                yy=yy,
@@ -874,7 +879,9 @@ class CSO_SimCatalogue(CSO_CatalogueBase):
                                vmax=vmax,
                                cmap=dict(colors=colors, color_bad=color_nan),
                                bmp=bmp,
                                domain=domain,
                                cbar=dict(label=label),
                                title=title,
                                figsize=figsize,
                            )
                            # save:
@@ -1192,11 +1199,11 @@ class CSO_GriddedCatalogue(CSO_CatalogueBase):
                            label = "%s [%s]" % (long_name, units)

                            # map properties:
                            bmp = dict(resolution="i", countries=True, title=title)
                            bmp = dict(countries=True)
                            bmp.update(bmp_kwargs)

                            # create map figure:
                            fig = cso_plot.QuickMap(
                            fig = cso_plot.QuickPat(
                                values,
                                xm=xm,
                                ym=ym,
@@ -1205,6 +1212,7 @@ class CSO_GriddedCatalogue(CSO_CatalogueBase):
                                cmap=dict(colors=colors),
                                bmp=bmp,
                                cbar=dict(label=label),
                                title=title,
                                figsize=figsize,
                            )
                            # save:
+283 −594

File changed.

Preview size limit exceeded, changes collapsed.