You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@climate.apache.org by go...@apache.org on 2013/06/21 22:37:03 UTC
svn commit: r1495590 -
/incubator/climate/trunk/rcmet/src/main/python/rcmes/toolkit/plots.py
Author: goodman
Date: Fri Jun 21 20:37:03 2013
New Revision: 1495590
URL: http://svn.apache.org/r1495590
Log:
CLIMATE-141: Fixed unreferenced import
Modified:
incubator/climate/trunk/rcmet/src/main/python/rcmes/toolkit/plots.py
Modified: incubator/climate/trunk/rcmet/src/main/python/rcmes/toolkit/plots.py
URL: http://svn.apache.org/viewvc/incubator/climate/trunk/rcmet/src/main/python/rcmes/toolkit/plots.py?rev=1495590&r1=1495589&r2=1495590&view=diff
==============================================================================
--- incubator/climate/trunk/rcmet/src/main/python/rcmes/toolkit/plots.py (original)
+++ incubator/climate/trunk/rcmet/src/main/python/rcmes/toolkit/plots.py Fri Jun 21 20:37:03 2013
@@ -22,6 +22,7 @@
from math import floor, log
from matplotlib import pyplot as plt
from mpl_toolkits.basemap import Basemap
+import matplotlib as mpl
import numpy as np
import os
@@ -95,7 +96,7 @@ def calc_nice_color_bar_values(mymin, my
return newmin, newmax, new_nlevs
-def draw_cntr_map_single(pVar, lon, lat, mnLvl, mxLvl, pTitle, pName, pType = 'png', cMap = plt.cm.jet):
+def draw_cntr_map_single(pVar, lon, lat, mnLvl, mxLvl, pTitle, pName, pType = 'png', cMap = None):
'''
Purpose::
Plots a filled contour map.
@@ -115,6 +116,9 @@ def draw_cntr_map_single(pVar, lon, lat,
TODO: Let user specify map projection, whether to mask bodies of water??
'''
+ if cMap is None:
+ cMap = plt.cm.jet
+
# Set up the figure
fig = plt.figure()
ax = fig.gca()
@@ -176,7 +180,7 @@ def draw_time_series_plot(data, times, m
ax = fig.gca()
if year_labels == False:
- xfmt = matplotlib.dates.DateFormatter('%b')
+ xfmt = mpl.dates.DateFormatter('%b')
ax.xaxis.set_major_formatter(xfmt)
# x-axis title