diff --git a/htdocs/plotting/auto/scripts/p13.py b/htdocs/plotting/auto/scripts/p13.py index 90cd2c8ee2..0f390f6130 100644 --- a/htdocs/plotting/auto/scripts/p13.py +++ b/htdocs/plotting/auto/scripts/p13.py @@ -7,9 +7,11 @@ import matplotlib.colors as mpcolors import numpy as np import pandas as pd +from matplotlib import cm +from pyiem.database import get_sqlalchemy_conn from pyiem.exceptions import NoDataFound -from pyiem.plot import centered_bins, figure_axes, get_cmap, plt -from pyiem.util import get_autoplot_context, get_sqlalchemy_conn +from pyiem.plot import centered_bins, figure_axes, get_cmap +from pyiem.util import get_autoplot_context from scipy import stats from sqlalchemy import text @@ -93,7 +95,7 @@ def plotter(fdict): ax.grid(True) ax.set_ylabel(f"{t1} Date") - sm = plt.cm.ScalarMappable(norm, cmap) + sm = cm.ScalarMappable(norm, cmap) sm.set_array(bins) cb = fig.colorbar(sm, extend="neither", ax=ax) cb.set_label(r"Summer Avg Temperature Departure $^\circ$F") diff --git a/htdocs/plotting/auto/scripts200/p231.py b/htdocs/plotting/auto/scripts200/p231.py index 5da0e0814d..a675e429b9 100644 --- a/htdocs/plotting/auto/scripts200/p231.py +++ b/htdocs/plotting/auto/scripts200/p231.py @@ -10,10 +10,11 @@ import datetime import pandas as pd +from pyiem.database import get_sqlalchemy_conn from pyiem.exceptions import NoDataFound -from pyiem.plot import MapPlot, plt +from pyiem.plot import MapPlot from pyiem.reference import state_names -from pyiem.util import get_autoplot_context, get_sqlalchemy_conn +from pyiem.util import get_autoplot_context def get_description(): @@ -203,7 +204,7 @@ def plotter(fdict): t.extend([(0.5, 1, 0.5)] * (11 - i - 1)) cellcolors.append(t) - plt.table( + ax.table( celltext, cellColours=cellcolors, rowLabels=dlabels, diff --git a/htdocs/plotting/auto/scripts200/p242.py b/htdocs/plotting/auto/scripts200/p242.py index 771c339113..13453a0502 100644 --- a/htdocs/plotting/auto/scripts200/p242.py +++ b/htdocs/plotting/auto/scripts200/p242.py @@ -10,12 +10,14 @@ import geopandas as gpd import matplotlib.patheffects as PathEffects from matplotlib.offsetbox import AnnotationBbox, OffsetImage +from pyiem.database import get_sqlalchemy_conn from pyiem.exceptions import NoDataFound from pyiem.network import Table as NetworkTable -from pyiem.plot import MapPlot, plt +from pyiem.plot import MapPlot from pyiem.plot.geoplot import MAIN_AX_BOUNDS +from pyiem.plot.use_agg import plt from pyiem.reference import Z_OVERLAY2 -from pyiem.util import get_autoplot_context, get_sqlalchemy_conn +from pyiem.util import get_autoplot_context from sqlalchemy import text ICONS = { diff --git a/htdocs/plotting/auto/scripts200/p243.py b/htdocs/plotting/auto/scripts200/p243.py index 48d46bf0df..e90fa0a8b7 100644 --- a/htdocs/plotting/auto/scripts200/p243.py +++ b/htdocs/plotting/auto/scripts200/p243.py @@ -15,9 +15,10 @@ import pandas as pd import pyiem.nws.vtec as vtec from pyiem import reference +from pyiem.database import get_sqlalchemy_conn from pyiem.exceptions import NoDataFound from pyiem.plot import figure -from pyiem.util import get_autoplot_context, get_sqlalchemy_conn +from pyiem.util import get_autoplot_context from sqlalchemy import text MDICT = {