Commit a8c6eebc authored by abuddenberg's avatar abuddenberg

Added comments describing what the color mean.

parent c94a164c
......@@ -24,9 +24,9 @@ from numpy.ma import masked_equal
import numpy as np
import matplotlib.pyplot as plt
from config import GLOBAL_PRECIP_FILES, SEASONS
from config import GLOBAL_PRECIP_FILES, NA_PRECIP_FILES, SEASONS
for infilename, outfilename in GLOBAL_PRECIP_FILES:
for infilename, outfilename in NA_PRECIP_FILES:
nc = netcdf_file(infilename)
lat_data = nc.variables['lat'].data
......@@ -34,7 +34,7 @@ for infilename, outfilename in GLOBAL_PRECIP_FILES:
fig = plt.figure(figsize=(25,16), dpi=100, tight_layout=True)
for i, season in enumerate(['Winter', 'Spring', 'Summer', 'Fall', 'Annual']):
for i, season in enumerate(['Winter', 'Spring', 'Summer', 'Fall']):
data_var, signif_var = SEASONS[season]
data = nc.variables[data_var].data
......@@ -73,13 +73,13 @@ for infilename, outfilename in GLOBAL_PRECIP_FILES:
#There's got to be a better way of doing this than copying the array
data = np.ma.masked_array(data)
data.mask = stipples_mask
data = np.ma.masked_array(data.filled(3.0)) #3.0 denotes areas of statistical significance
data = np.ma.masked_array(data.filled(3.0)) #3.0 denotes areas of statistical significance; red
data.mask = zeros_mask
data = np.ma.masked_array(data.filled(1.0)) #1.0 denotes areas little change
data = np.ma.masked_array(data.filled(1.0)) #1.0 denotes areas little change; blue
data.mask = third_cat_mask
data = np.ma.masked_array(data.filled(2.0)) #2.0 denotes areas of statistical uncertainty
data = np.ma.masked_array(data.filled(2.0)) #2.0 denotes areas of statistical uncertainty; green
weird = m.pcolor(x,y, data)
......@@ -91,6 +91,6 @@ for infilename, outfilename in GLOBAL_PRECIP_FILES:
# print np.any(np.logical_and(third_cat_mask, stipples_mask))
plt.savefig('../dist/' + outfilename.format('north_american_categories'), format='eps', dpi=200)
# plt.show()
# plt.savefig('../dist/' + outfilename.format('north_american_categories'), format='eps', dpi=200)
plt.show()
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment