Skip to content
This repository has been archived by the owner on May 12, 2021. It is now read-only.

Commit

Permalink
CLIMATE-625 Update draw_histogram and draw_marker_on_map documentation
Browse files Browse the repository at this point in the history
  • Loading branch information
Michael Anderson authored and Michael Anderson committed Jan 5, 2018
1 parent 4cf79f3 commit 6b30af8
Showing 1 changed file with 31 additions and 14 deletions.
45 changes: 31 additions & 14 deletions ocw/plotter.py
Expand Up @@ -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
Expand Down Expand Up @@ -1063,14 +1072,22 @@ def add_contours(self, std1, corr1, std2, corr2, **kwargs):

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
Expand Down

0 comments on commit 6b30af8

Please sign in to comment.