Return-Path: X-Original-To: apmail-climate-commits-archive@minotaur.apache.org Delivered-To: apmail-climate-commits-archive@minotaur.apache.org Received: from mail.apache.org (hermes.apache.org [140.211.11.3]) by minotaur.apache.org (Postfix) with SMTP id 9106011ECA for ; Wed, 2 Jul 2014 13:33:08 +0000 (UTC) Received: (qmail 95344 invoked by uid 500); 2 Jul 2014 13:33:08 -0000 Delivered-To: apmail-climate-commits-archive@climate.apache.org Received: (qmail 95307 invoked by uid 500); 2 Jul 2014 13:33:08 -0000 Mailing-List: contact commits-help@climate.apache.org; run by ezmlm Precedence: bulk List-Help: List-Unsubscribe: List-Post: List-Id: Reply-To: dev@climate.apache.org Delivered-To: mailing list commits@climate.apache.org Received: (qmail 95285 invoked by uid 99); 2 Jul 2014 13:33:08 -0000 Received: from tyr.zones.apache.org (HELO tyr.zones.apache.org) (140.211.11.114) by apache.org (qpsmtpd/0.29) with ESMTP; Wed, 02 Jul 2014 13:33:08 +0000 Received: by tyr.zones.apache.org (Postfix, from userid 65534) id 0F6999934A0; Wed, 2 Jul 2014 13:33:08 +0000 (UTC) Content-Type: text/plain; charset="us-ascii" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit From: joyce@apache.org To: commits@climate.apache.org Date: Wed, 02 Jul 2014 13:33:09 -0000 Message-Id: In-Reply-To: <6b476f47a12744deb295afd65832e190@git.apache.org> References: <6b476f47a12744deb295afd65832e190@git.apache.org> X-Mailer: ASF-Git Admin Mailer Subject: [3/6] git commit: CLIMATE-241 - Update draw_time_series docstring format CLIMATE-241 - Update draw_time_series docstring format Project: http://git-wip-us.apache.org/repos/asf/climate/repo Commit: http://git-wip-us.apache.org/repos/asf/climate/commit/3ac4438e Tree: http://git-wip-us.apache.org/repos/asf/climate/tree/3ac4438e Diff: http://git-wip-us.apache.org/repos/asf/climate/diff/3ac4438e Branch: refs/heads/master Commit: 3ac4438e6e172dd9cacee714d61507b49c0de600 Parents: a0fab68 Author: Michael Joyce Authored: Tue Jul 1 09:11:14 2014 -0700 Committer: Michael Joyce Committed: Tue Jul 1 09:11:14 2014 -0700 ---------------------------------------------------------------------- ocw/plotter.py | 52 ++++++++++++++++++++++++++++++++-------------------- 1 file changed, 32 insertions(+), 20 deletions(-) ---------------------------------------------------------------------- http://git-wip-us.apache.org/repos/asf/climate/blob/3ac4438e/ocw/plotter.py ---------------------------------------------------------------------- diff --git a/ocw/plotter.py b/ocw/plotter.py index b9ba95d..5c6f58d 100644 --- a/ocw/plotter.py +++ b/ocw/plotter.py @@ -330,27 +330,39 @@ def draw_subregions(subregions, lats, lons, fname, fmt='png', ptitle='', def draw_time_series(results, times, labels, fname, fmt='png', gridshape=(1, 1), xlabel='', ylabel='', ptitle='', subtitles=None, label_month=False, yscale='linear', aspect=None): - ''' - Purpose:: - Function to draw a time series plot + ''' Draw a time series plot. - Input:: - results - a 3d array of time series - times - a list of python datetime objects - labels - a list of strings with the names of each set of data - fname - a string specifying the filename of the plot - fmt - an optional string specifying the output filetype - gridshape - optional tuple denoting the desired grid shape (nrows, ncols) for arranging - the subplots. - xlabel - a string specifying the x-axis title - ylabel - a string specifying the y-axis title - ptitle - a string specifying the plot title - subtitles - an optional list of strings specifying the title for each subplot - label_month - optional bool to toggle drawing month labels - yscale - optional string for setting the y-axis scale, 'linear' for linear - and 'log' for log base 10. - aspect - Float denoting approximate aspect ratio of each subplot - (width / height). Default is 8.5 / 5.5 + :param results: 3D array of time series data. + :type results: Numpy Array + :param times: List of Python datetime objects used by Matplotlib to handle + axis formatting. + :type times: List of datetime objects + :param labels: List of names for each data being plotted. + :type labels: List of string + :param fname: Filename of the plot. + :type fname: string + :param fmt: Optional filetype for the output. + :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 xlabel: Optional x-axis title. + :type xlabel: string + :param ylabel: Optional y-ayis title. + :type ylabel: string + :param ptitle: Optional plot title. + :type ptitle: string + :param subtitles: Optional list of titles for each subplot. + :type subtitles: List of strings + :param label_month: Optional flag to toggle drawing month labels on the + x-axis. + :type label_month: boolean + :param yscale: Optional y-axis scale value, 'linear' for linear and 'log' + for log base 10. + :type yscale: string + :param aspect: Optional approximate aspect ratio of each subplot + (width / height). Default is 8.5 / 5.5 + :type aspect: float ''' # Handle the single plot case. if results.ndim == 2: