You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@climate.apache.org by jo...@apache.org on 2015/03/19 15:23:33 UTC

[1/2] climate git commit: CLIMATE-604 - Fix draw_subregions

Repository: climate
Updated Branches:
  refs/heads/master 6725431fb -> 44d8d29f9


CLIMATE-604 - Fix draw_subregions

- Access to various Bounds objects have been updated to use the proper
  variable names. Additionally, attempted access to Bounds attributes
  that don't exist (e.g., name) have been changed.
- Minor docstring update for clarity.


Project: http://git-wip-us.apache.org/repos/asf/climate/repo
Commit: http://git-wip-us.apache.org/repos/asf/climate/commit/bd920d2f
Tree: http://git-wip-us.apache.org/repos/asf/climate/tree/bd920d2f
Diff: http://git-wip-us.apache.org/repos/asf/climate/diff/bd920d2f

Branch: refs/heads/master
Commit: bd920d2f0a3a5ed67db4545c9a7a82a87f77048b
Parents: 6725431
Author: Kim Whitehall <k_...@yahoo.com>
Authored: Mon Mar 16 17:42:58 2015 -0700
Committer: Michael Joyce <jo...@apache.org>
Committed: Thu Mar 19 07:20:07 2015 -0700

----------------------------------------------------------------------
 ocw/plotter.py | 8 ++++----
 1 file changed, 4 insertions(+), 4 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/climate/blob/bd920d2f/ocw/plotter.py
----------------------------------------------------------------------
diff --git a/ocw/plotter.py b/ocw/plotter.py
index a9c0b7f..b931c6c 100644
--- a/ocw/plotter.py
+++ b/ocw/plotter.py
@@ -238,7 +238,7 @@ def draw_subregions(subregions, lats, lons, fname, fmt='png', ptitle='',
     ''' Draw subregion domain(s) on a map.
 
     :param subregions: The subregion objects to plot on the map.
-    :type subregions: :class:`list` of subregion objects
+    :type subregions: :class:`list` of subregion objects (Bounds objects)
 
     :param lats: Array of latitudes values.
     :type lats: :class:`numpy.ndarray`
@@ -322,8 +322,8 @@ def draw_subregions(subregions, lats, lons, fname, fmt='png', ptitle='',
 
         nlats, nlons = domain.shape
         domain = ma.masked_equal(domain, 0)
-        reglats = np.linspace(reg.latmin, reg.latmax, nlats)
-        reglons = np.linspace(reg.lonmin, reg.lonmax, nlons)
+        reglats = np.linspace(reg.lat_min, reg.lat_max, nlats)
+        reglons = np.linspace(reg.lon_min, reg.lon_max, nlons)
         reglons, reglats = np.meshgrid(reglons, reglats)
 
         # Convert to to projection coordinates. Not really necessary
@@ -336,7 +336,7 @@ def draw_subregions(subregions, lats, lons, fname, fmt='png', ptitle='',
 
         # Label the subregion
         xm, ym = x.mean(), y.mean()
-        m.plot(xm, ym, marker='$%s$' %(reg.name), markersize=12, color='k')
+        m.plot(xm, ym, marker='$%s$' %("R"+str(i+1)), markersize=12, color='k')
 
     # Add the title
     ax.set_title(ptitle)


[2/2] climate git commit: Resolve CLIMATE-604. Merge PR #175.

Posted by jo...@apache.org.
Resolve CLIMATE-604. Merge PR #175.


Project: http://git-wip-us.apache.org/repos/asf/climate/repo
Commit: http://git-wip-us.apache.org/repos/asf/climate/commit/44d8d29f
Tree: http://git-wip-us.apache.org/repos/asf/climate/tree/44d8d29f
Diff: http://git-wip-us.apache.org/repos/asf/climate/diff/44d8d29f

Branch: refs/heads/master
Commit: 44d8d29f9091a951a6224a29fd5d5165b70f599e
Parents: 6725431 bd920d2
Author: Michael Joyce <jo...@apache.org>
Authored: Thu Mar 19 07:22:58 2015 -0700
Committer: Michael Joyce <jo...@apache.org>
Committed: Thu Mar 19 07:22:58 2015 -0700

----------------------------------------------------------------------
 ocw/plotter.py | 8 ++++----
 1 file changed, 4 insertions(+), 4 deletions(-)
----------------------------------------------------------------------