Repository: climate Updated Branches: refs/heads/master 09b47299b -> e63c5f284
CLIMATE-625 Update draw_histogram and draw_marker_on_map documentation Project: http://git-wip-us.apache.org/repos/asf/climate/repo Commit: http://git-wip-us.apache.org/repos/asf/climate/commit/6b30af86 Tree: http://git-wip-us.apache.org/repos/asf/climate/tree/6b30af86 Diff: http://git-wip-us.apache.org/repos/asf/climate/diff/6b30af86 Branch: refs/heads/master Commit: 6b30af86c198381bb8b421adef7c5866fd56dfd2 Parents: 4cf79f3 Author: Michael Anderson <michaelanderson@Michaels-iMac.local> Authored: Thu Jan 4 21:52:36 2018 -0500 Committer: Michael Anderson <michaelanderson@Michaels-iMac.local> Committed: Thu Jan 4 21:52:36 2018 -0500 ---------------------------------------------------------------------- ocw/plotter.py | 45 +++++++++++++++++++++++++++++++-------------- 1 file changed, 31 insertions(+), 14 deletions(-) ---------------------------------------------------------------------- http://git-wip-us.apache.org/repos/asf/climate/blob/6b30af86/ocw/plotter.py ---------------------------------------------------------------------- diff --git a/ocw/plotter.py b/ocw/plotter.py index 7f9b092..960dae1 100755 --- a/ocw/plotter.py +++ b/ocw/plotter.py @@ -565,14 +565,23 @@ def draw_barchart(results, yvalues, fname, ptitle='', fmt='png', def draw_marker_on_map(lat, lon, fname, fmt='png', location_name=' ', gridshape=(1, 1)): - ''' - Purpose:: - Draw a marker on a map + '''Draw a marker on a map. + + :param lat: Latitude for plotting a marker. + :type lat: :class:`float` + + :param lon: Longitude for plotting a marker. + :type lon: :class:`float` + + :param fname: The filename of the plot. + :type fname: :class:`string` + + :param fmt: (Optional) Filetype for the output. + :type fmt: :class:`string` + + :param location_name: (Optional) A label for the map marker. + :type location_name: :class:`string` - Input:: - lat - latitude for plotting a marker - lon - longitude for plotting a marker - fname - a string specifying the filename of the plot ''' fig = plt.figure() fig.dpi = 300 @@ -1063,14 +1072,22 @@ class TaylorDiagram(object): def draw_histogram(dataset_array, data_names, fname, fmt='png', nbins=10): ''' - Purpose:: - Draw histograms + Purpose:: Draw a histogram for the input dataset. - Input:: - dataset_array - a list of data values [data1, data2, ....] - data_names - a list of data names ['name1','name2',....] - fname - a string specifying the filename of the plot - bins - number of bins + :param dataset_array: A list of data values [data1, data2, ....]. + :type dataset_array: :class:`list` of :class:`float` + + :param data_names: A list of data names ['name1','name2',....]. + :type data_names: :class:`list` of :class:`string` + + :param fname: The filename of the plot. + :type fname: :class:`string` + + :param fmt: (Optional) Filetype for the output. + :type fmt: :class:`string` + + :param bins: (Optional) Number of bins. + :type bins: :class:`integer` ''' fig = plt.figure() fig.dpi = 300