from pyiem.plot import MapPlot
import psycopg2
from pandas.io.sql import read_sql

pgconn = psycopg2.connect(database='iem', host='iemdb', user='nobody')

df = read_sql("""SELECT ST_x(geom) as x, ST_y(geom) as y,
 min(min_tmpf) as val, state, count(*) from
 summary_2016 s JOIN stations t on (t.iemid = s.iemid) WHERE
 s.day > '2016-09-01' and min_tmpf is not null and t.country = 'US' and
 t.network ~* 'COOP' and t.state in ('IA', 'MN', 'ND', 'SD', 'NE',
 'KS', 'MO', 'WI', 'IL', 'IN', 'OH', 'MI', 'KY') GROUP by y, x, state
 ORDER by val ASC""", pgconn, index_col=None)
df = df[(df['count'] > 110)]
print df[df['state'] == 'IA']
x3 = df[(df.val < 32) & (df.val >= 10)]
x2 = df[(df.val < 10) & (df.val > -10)]
x1 = df[df.val < -10]

m = MapPlot(title='Fall 2016 Minimum Temperature Reports', axisbg='white',
            subtitle=('Based on NWS Cooperative Observer Data, '
                      'thru 27 Dec 2016'),
            sector='midwest')

x, y = m.map(tuple(x3.x), tuple(x3.y))
m.map.scatter(x, y, marker='o', color='g', s=50, zorder=1,
              label="10 to 32$^\circ$F")
x, y = m.map(tuple(x2.x), tuple(x2.y))
m.map.scatter(x, y, marker='s', zorder=1, s=50,
              label="-10 to 10$^\circ$F")
x, y = m.map(tuple(x1.x), tuple(x1.y))
m.map.scatter(x, y, marker='+', color='r', s=50, zorder=2,
              label="Sub -10$^\circ$F")

m.ax.legend(loc=4, scatterpoints=1, ncol=3)

m.postprocess(filename='test.png')

@@ -599,37 +599,8 @@
 0)%5D%0A
-print df%5Bdf%5B'state'%5D == 'IA'%5D
 %0Ax3 
@@ -684,16 +684,17 @@
 x1 = df%5B
+(
 df.val %3C
@@ -697,16 +697,56 @@
 al %3C -10
+) & (df.val %3E -30)%5D%0Ax0 = df%5Bdf.val %3C -30
 %5D%0A%0Am = M
@@ -1163,16 +1163,27 @@
 ker='s',
+ color='b',
  zorder=
@@ -1331,16 +1331,176 @@
 rder=2,%0A
+              label=%22-30 to -10$%5E%5Ccirc$F%22)%0Ax, y = m.map(tuple(x0.x), tuple(x0.y))%0Am.map.scatter(x, y, marker='v', facecolor='w', edgecolor='k', s=50, zorder=2,%0A
         
@@ -1517,17 +1517,17 @@
 l=%22Sub -
-1
+3
 0$%5E%5Ccirc
@@ -1573,17 +1573,17 @@
 1, ncol=
-3
+4
 )%0A%0Am.pos

add another plot interval