deprecations in matplotlib

Issue #594 resolved
Reimar Bauer created an issue
mslib/mswms/_tests/test_mss_plot_driver.py::Test_HSec::test_HS_SeaIceStyle_01[PCOL]
  /home/user/PycharmProjects/mss/mslib/mswms/mpl_hsec_styles.py:367: MatplotlibDeprecationWarning: shading='flat' when X and Y have the same dimensions as C is deprecated since 3.3.  Either specify the corners of the quadrilaterals with X and Y, or pass shading='auto', 'nearest' or 'gouraud', or set rcParams['pcolor.shading'].  This will become an error two minor releases later.
    scs = bm.pcolor(lonmesh, latmesh, ice,

mslib/mswms/_tests/test_mss_plot_driver.py::Test_HSec::test_HS_GenericStyle_styles[default]
mslib/mswms/_tests/test_mss_plot_driver.py::Test_HSec::test_HS_GenericStyle_styles[nonlinear]
mslib/mswms/_tests/test_mss_plot_driver.py::Test_HSec::test_HS_GenericStyle_styles[auto]
mslib/mswms/_tests/test_mss_plot_driver.py::Test_HSec::test_HS_GenericStyle_styles[log]
mslib/mswms/_tests/test_mss_plot_driver.py::Test_HSec::test_HS_GenericStyle_styles[autolog]
mslib/mswms/_tests/test_mss_plot_driver.py::Test_HSec::test_HS_GenericStyle_other
  /home/user/PycharmProjects/mss/mslib/mswms/mpl_hsec_styles.py:515: MatplotlibDeprecationWarning: The 'norm' parameter to Colorbar has no effect because it is overridden by the mappable; it is deprecated since 3.3 and will be removed two minor releases later.
    cbar = self.fig.colorbar(tc, fraction=0.05, pad=0.08, shrink=0.7,



mslib/mswms/_tests/test_mss_plot_driver.py::Test_HSec::test_HS_EMAC_TracerStyle_ML_01
  /home/user/PycharmProjects/mss/mslib/mswms/mpl_hsec_styles.py:1145: MatplotlibDeprecationWarning: shading='flat' when X and Y have the same dimensions as C is deprecated since 3.3.  Either specify the corners of the quadrilaterals with X and Y, or pass shading='auto', 'nearest' or 'gouraud', or set rcParams['pcolor.shading'].  This will become an error two minor releases later.
    tc = bm.pcolor(lonmesh, latmesh, tracer,



mslib/mswms/_tests/test_mss_plot_driver.py::Test_HSec::test_HS_EMAC_TracerStyle_SFC_01
  /home/user/PycharmProjects/mss/mslib/mswms/mpl_hsec_styles.py:1219: MatplotlibDeprecationWarning: shading='flat' when X and Y have the same dimensions as C is deprecated since 3.3.  Either specify the corners of the quadrilaterals with X and Y, or pass shading='auto', 'nearest' or 'gouraud', or set rcParams['pcolor.shading'].  This will become an error two minor releases later.
    tc = bm.pcolor(lonmesh, latmesh, tracer,

Comments (1)

  1. Reimar Bauer reporter

    Added shading parameter to pcolor

    • Adde "nearest" shading tp pcolor, which is what we wanted anyway. Simplifies code.
    • Replaced pcolor by the newer and faster pcolormesh
    • Removed the superfluous "norm" parameter from generic plot

    Fix issue #594

    → <<cset f1105f113169>>

  2. Log in to comment