climate-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From jo...@apache.org
Subject [1/6] git commit: CLIMATE-241 - Update draw_taylor_diagram docstring format
Date Wed, 02 Jul 2014 13:33:07 GMT
Repository: climate
Updated Branches:
  refs/heads/master c23f59e64 -> 9b6d73d48


CLIMATE-241 - Update draw_taylor_diagram docstring format


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

Branch: refs/heads/master
Commit: e867441ce3b04a5e95ee3c059ca501abd0d0ac1b
Parents: c23f59e
Author: Michael Joyce <joyce@apache.org>
Authored: Tue Jul 1 08:45:22 2014 -0700
Committer: Michael Joyce <joyce@apache.org>
Committed: Tue Jul 1 08:45:22 2014 -0700

----------------------------------------------------------------------
 ocw/plotter.py | 52 +++++++++++++++++++++++++++++++---------------------
 1 file changed, 31 insertions(+), 21 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/climate/blob/e867441c/ocw/plotter.py
----------------------------------------------------------------------
diff --git a/ocw/plotter.py b/ocw/plotter.py
index d0f6b62..d79535c 100644
--- a/ocw/plotter.py
+++ b/ocw/plotter.py
@@ -152,27 +152,37 @@ def _fig_size(gridshape, aspect=None):
 def draw_taylor_diagram(results, names, refname, fname, fmt='png',
                         gridshape=(1,1), ptitle='', subtitles=None,
                         pos='upper right', frameon=True, radmax=1.5):
-    '''
-    Purpose::
-        Draws a Taylor diagram
-
-    Input::
-        results - an Nx2 array containing normalized standard deviations,
-               correlation coefficients, and names of evaluation results
-        names - list of names for each evaluated dataset
-        refname - The name of the reference dataset
-        fname  - a string specifying the filename of the plot
-        fmt  - an optional string specifying the filetype, default is .png
-        gridshape - optional tuple denoting the desired grid shape (nrows, ncols) for arranging
-                    the subplots.
-        ptitle - an optional string specifying the plot title
-        subtitles - an optional list of strings specifying the title for each subplot
-        pos - an optional string or tuple of float for determining
-                    the position of the legend
-        frameon - an optional boolean that determines whether to draw a frame
-                        around the legend box
-        radmax - an optional float to adjust the extent of the axes in terms of
-                 standard deviation.
+    ''' Draw a Taylor diagram.
+
+    :param results: An Nx2 array containing normalized standard deviations,
+       correlation coefficients, and names of evaluation results.
+    :type results: Numpy Array
+    :param names: A list of names for each evaluated dataset
+    :type names: List of strings
+    :param refname: The name of the reference dataset.
+    :type refname: string
+    :param fname: The filename of the plot.
+    :type fname: string
+    :param fmt: Optional filetype for the output plot.
+    :type fmt: string
+    :param gridshape: Optional tuple denoting the desired grid shape
+        (num_rows, num_cols) for arranging the subplots.
+    :type gridshape: Tuple (num_rows, num_cols)
+    :param ptitle: Optional plot title.
+    :type ptitle: string
+    :param subtitles: Optional list of strings specifying the title for each
+        subplot.
+    :type subtitles: List of strings
+    :param pos: Optional string or tuple of floats used to set the position
+        of the legend. Check the `Matplotlib docs <http://matplotlib.org/api/legend_api.html#matplotlib.legend.Legend>`_
+        for additional information.
+    :type pos: string or tuple of floats
+    :param frameon: Optional boolean specifying whether to draw a frame
+        around the legend box.
+    :type frameon: boolean
+    :param radmax: Optional float to adjust the extent of the axes in terms of
+        standard deviation.
+    :type radmax: float
     '''
     # Handle the single plot case.
     if results.ndim == 2:


Mime
View raw message