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 2014/06/11 17:11:20 UTC

[1/2] git commit: CLIMATE-472 - Fix overlapping colorbar labels

Repository: climate
Updated Branches:
  refs/heads/master cbe10b793 -> a52932dba


CLIMATE-472 - Fix overlapping colorbar labels

- Switch colorbar labels to use scientific notation.
- Reduce labelsize to avoid overlap.


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

Branch: refs/heads/master
Commit: 30e84efaa94fd93a532a95a073f8096417c08244
Parents: 8b84418
Author: Michael Joyce <jo...@apache.org>
Authored: Tue Jun 10 21:15:13 2014 -0700
Committer: Michael Joyce <jo...@apache.org>
Committed: Tue Jun 10 21:15:13 2014 -0700

----------------------------------------------------------------------
 ocw/plotter.py | 7 +++++--
 1 file changed, 5 insertions(+), 2 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/climate/blob/30e84efa/ocw/plotter.py
----------------------------------------------------------------------
diff --git a/ocw/plotter.py b/ocw/plotter.py
index 33a1bd1..9e7080d 100644
--- a/ocw/plotter.py
+++ b/ocw/plotter.py
@@ -536,9 +536,10 @@ def draw_contour_map(dataset, lats, lons, fname, fmt='png', gridshape=(1, 1),
 
     # Add colorbar
     cbar = fig.colorbar(cs, cax=ax.cax, drawedges=True, orientation='horizontal',
-                        extendfrac='auto')
+                        extendfrac='auto', format='%.3e')
     cbar.set_label(clabel)
     cbar.set_ticks(clevs)
+    cbar.ax.tick_params(labelsize=6)
     cbar.ax.xaxis.set_ticks_position('none')
     cbar.ax.yaxis.set_ticks_position('none')
 
@@ -672,9 +673,11 @@ def draw_portrait_diagram(results, rowlabels, collabels, fname, fmt='png',
     # Add colorbar
     cax = ax.cax
     cbar = fig.colorbar(cs, cax=cax, norm=norm, boundaries=clevs, drawedges=True,
-                        extend=extend, orientation='horizontal', extendfrac='auto')
+                        extend=extend, orientation='horizontal', extendfrac='auto',
+                        format='%.2e')
     cbar.set_label(clabel)
     cbar.set_ticks(clevs)
+    cbar.ax.tick_params(labelsize=6)
     cbar.ax.xaxis.set_ticks_position('none')
     cbar.ax.yaxis.set_ticks_position('none')
 


[2/2] git commit: Resolve CLIMATE-472. Merge PR #72.

Posted by jo...@apache.org.
Resolve CLIMATE-472. Merge PR #72.


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

Branch: refs/heads/master
Commit: a52932dba8e894e60ca7524dab3d438155414368
Parents: cbe10b7 30e84ef
Author: Michael Joyce <jo...@apache.org>
Authored: Wed Jun 11 08:11:05 2014 -0700
Committer: Michael Joyce <jo...@apache.org>
Committed: Wed Jun 11 08:11:05 2014 -0700

----------------------------------------------------------------------
 ocw/plotter.py | 7 +++++--
 1 file changed, 5 insertions(+), 2 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/climate/blob/a52932db/ocw/plotter.py
----------------------------------------------------------------------