Skip to content

Commit

Permalink
mnt: fix pyiem imports
Browse files Browse the repository at this point in the history
  • Loading branch information
akrherz committed Feb 6, 2024
1 parent 828d1da commit 7751578
Show file tree
Hide file tree
Showing 4 changed files with 15 additions and 9 deletions.
8 changes: 5 additions & 3 deletions htdocs/plotting/auto/scripts/p13.py
Original file line number Diff line number Diff line change
Expand Up @@ -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

Expand Down Expand Up @@ -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")
Expand Down
7 changes: 4 additions & 3 deletions htdocs/plotting/auto/scripts200/p231.py
Original file line number Diff line number Diff line change
Expand Up @@ -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():
Expand Down Expand Up @@ -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,
Expand Down
6 changes: 4 additions & 2 deletions htdocs/plotting/auto/scripts200/p242.py
Original file line number Diff line number Diff line change
Expand Up @@ -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 = {
Expand Down
3 changes: 2 additions & 1 deletion htdocs/plotting/auto/scripts200/p243.py
Original file line number Diff line number Diff line change
Expand Up @@ -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 = {
Expand Down

0 comments on commit 7751578

Please sign in to comment.