Modified: websites/staging/climate/trunk/content/api/current/ocw/plotter.html ============================================================================== --- websites/staging/climate/trunk/content/api/current/ocw/plotter.html (original) +++ websites/staging/climate/trunk/content/api/current/ocw/plotter.html Mon Apr 24 21:37:01 2017 @@ -6,7 +6,7 @@ <head> <meta http-equiv="Content-Type" content="text/html; charset=utf-8" /> - <title>Plotter Module — Apache Open Climate Workbench 1.1.0 documentation</title> + <title>Plotter Module — Apache Open Climate Workbench 1.2.0 documentation</title> <link rel="stylesheet" href="../_static/alabaster.css" type="text/css" /> <link rel="stylesheet" href="../_static/pygments.css" type="text/css" /> @@ -14,7 +14,7 @@ <script type="text/javascript"> var DOCUMENTATION_OPTIONS = { URL_ROOT: '../', - VERSION: '1.1.0', + VERSION: '1.2.0', COLLAPSE_INDEX: false, FILE_SUFFIX: '.html', HAS_SOURCE: true @@ -23,36 +23,20 @@ <script type="text/javascript" src="../_static/jquery.js"></script> <script type="text/javascript" src="../_static/underscore.js"></script> <script type="text/javascript" src="../_static/doctools.js"></script> - <link rel="top" title="Apache Open Climate Workbench 1.1.0 documentation" href="../index.html" /> + <link rel="index" title="Index" href="../genindex.html" /> + <link rel="search" title="Search" href="../search.html" /> + <link rel="top" title="Apache Open Climate Workbench 1.2.0 documentation" href="../index.html" /> <link rel="next" title="Utils Module" href="utils.html" /> <link rel="prev" title="Metrics Module" href="metrics.html" /> + <link rel="stylesheet" href="../_static/custom.css" type="text/css" /> - <meta name="viewport" content="width=device-width, initial-scale=0.9, maximum-scale=0.9"> + + <meta name="viewport" content="width=device-width, initial-scale=0.9, maximum-scale=0.9" /> </head> <body role="document"> - <div class="related" role="navigation" aria-label="related navigation"> - <h3>Navigation</h3> - <ul> - <li class="right" style="margin-right: 10px"> - <a href="../genindex.html" title="General Index" - accesskey="I">index</a></li> - <li class="right" > - <a href="../http-routingtable.html" title="HTTP Routing Table" - >routing table</a> |</li> - <li class="right" > - <a href="../py-modindex.html" title="Python Module Index" - >modules</a> |</li> - <li class="right" > - <a href="utils.html" title="Utils Module" - accesskey="N">next</a> |</li> - <li class="right" > - <a href="metrics.html" title="Metrics Module" - accesskey="P">previous</a> |</li> - <li class="nav-item nav-item-0"><a href="../index.html">Apache Open Climate Workbench 1.1.0 documentation</a> »</li> - </ul> - </div> + <div class="document"> <div class="documentwrapper"> @@ -113,13 +97,13 @@ command.</p> <col class="field-body" /> <tbody valign="top"> <tr class="field-odd field"><th class="field-name">Parameters:</th><td class="field-body"><ul class="first last simple"> -<li><strong>results</strong> (<a class="reference external" href="http://docs.scipy.org/doc/numpy/reference/generated/numpy.ndarray.html#numpy.ndarray" title="(in NumPy v1.11)"><code class="xref py py-class docutils literal"><span class="pre">numpy.ndarray</span></code></a>) – 1D array of data.</li> +<li><strong>results</strong> (<a class="reference external" href="https://docs.scipy.org/doc/numpy/reference/generated/numpy.ndarray.html#numpy.ndarray" title="(in NumPy v1.12)"><code class="xref py py-class docutils literal"><span class="pre">numpy.ndarray</span></code></a>) – 1D array of data.</li> <li><strong>yvalues</strong> – List of y-axis labels</li> -<li><strong>fname</strong> (<a class="reference external" href="http://docs.python.org/2/library/string.html#module-string" title="(in Python v2.7)"><code class="xref py py-mod docutils literal"><span class="pre">string</span></code></a>) – Filename of the plot.</li> -<li><strong>ptitle</strong> (<a class="reference external" href="http://docs.python.org/2/library/string.html#module-string" title="(in Python v2.7)"><code class="xref py py-mod docutils literal"><span class="pre">string</span></code></a>) – (Optional) plot title.</li> -<li><strong>fmt</strong> (<a class="reference external" href="http://docs.python.org/2/library/string.html#module-string" title="(in Python v2.7)"><code class="xref py py-mod docutils literal"><span class="pre">string</span></code></a>) – (Optional) filetype for the output.</li> -<li><strong>xlabel</strong> (<a class="reference external" href="http://docs.python.org/2/library/string.html#module-string" title="(in Python v2.7)"><code class="xref py py-mod docutils literal"><span class="pre">string</span></code></a>) – (Optional) x-axis title.</li> -<li><strong>ylabel</strong> (<a class="reference external" href="http://docs.python.org/2/library/string.html#module-string" title="(in Python v2.7)"><code class="xref py py-mod docutils literal"><span class="pre">string</span></code></a>) – (Optional) y-axis title.</li> +<li><strong>fname</strong> (<a class="reference external" href="https://docs.python.org/2/library/string.html#module-string" title="(in Python v2.7)"><code class="xref py py-mod docutils literal"><span class="pre">string</span></code></a>) – Filename of the plot.</li> +<li><strong>ptitle</strong> (<a class="reference external" href="https://docs.python.org/2/library/string.html#module-string" title="(in Python v2.7)"><code class="xref py py-mod docutils literal"><span class="pre">string</span></code></a>) – (Optional) plot title.</li> +<li><strong>fmt</strong> (<a class="reference external" href="https://docs.python.org/2/library/string.html#module-string" title="(in Python v2.7)"><code class="xref py py-mod docutils literal"><span class="pre">string</span></code></a>) – (Optional) filetype for the output.</li> +<li><strong>xlabel</strong> (<a class="reference external" href="https://docs.python.org/2/library/string.html#module-string" title="(in Python v2.7)"><code class="xref py py-mod docutils literal"><span class="pre">string</span></code></a>) – (Optional) x-axis title.</li> +<li><strong>ylabel</strong> (<a class="reference external" href="https://docs.python.org/2/library/string.html#module-string" title="(in Python v2.7)"><code class="xref py py-mod docutils literal"><span class="pre">string</span></code></a>) – (Optional) y-axis title.</li> </ul> </td> </tr> @@ -136,29 +120,29 @@ command.</p> <col class="field-body" /> <tbody valign="top"> <tr class="field-odd field"><th class="field-name">Parameters:</th><td class="field-body"><ul class="first last simple"> -<li><strong>dataset</strong> (<a class="reference external" href="http://docs.scipy.org/doc/numpy/reference/generated/numpy.ndarray.html#numpy.ndarray" title="(in NumPy v1.11)"><code class="xref py py-class docutils literal"><span class="pre">numpy.ndarray</span></code></a>) – 3D array of data to be plotted with shape (nT, nLat, nLon).</li> -<li><strong>lats</strong> (<a class="reference external" href="http://docs.scipy.org/doc/numpy/reference/generated/numpy.ndarray.html#numpy.ndarray" title="(in NumPy v1.11)"><code class="xref py py-class docutils literal"><span class="pre">numpy.ndarray</span></code></a>) – Array of latitudes values.</li> -<li><strong>lons</strong> (<a class="reference external" href="http://docs.scipy.org/doc/numpy/reference/generated/numpy.ndarray.html#numpy.ndarray" title="(in NumPy v1.11)"><code class="xref py py-class docutils literal"><span class="pre">numpy.ndarray</span></code></a>) – Array of longitudes</li> -<li><strong>fname</strong> (<a class="reference external" href="http://docs.python.org/2/library/string.html#module-string" title="(in Python v2.7)"><code class="xref py py-mod docutils literal"><span class="pre">string</span></code></a>) – The filename of the plot.</li> -<li><strong>fmt</strong> (<a class="reference external" href="http://docs.python.org/2/library/string.html#module-string" title="(in Python v2.7)"><code class="xref py py-mod docutils literal"><span class="pre">string</span></code></a>) – (Optional) filetype for the output.</li> -<li><strong>gridshape</strong> (<a class="reference external" href="http://docs.python.org/2/library/functions.html#tuple" title="(in Python v2.7)"><code class="xref py py-func docutils literal"><span class="pre">tuple()</span></code></a> of the form (num_rows, num_cols)) – (Optional) tuple denoting the desired grid shape +<li><strong>dataset</strong> (<a class="reference external" href="https://docs.scipy.org/doc/numpy/reference/generated/numpy.ndarray.html#numpy.ndarray" title="(in NumPy v1.12)"><code class="xref py py-class docutils literal"><span class="pre">numpy.ndarray</span></code></a>) – 3D array of data to be plotted with shape (nT, nLat, nLon).</li> +<li><strong>lats</strong> (<a class="reference external" href="https://docs.scipy.org/doc/numpy/reference/generated/numpy.ndarray.html#numpy.ndarray" title="(in NumPy v1.12)"><code class="xref py py-class docutils literal"><span class="pre">numpy.ndarray</span></code></a>) – Array of latitudes values.</li> +<li><strong>lons</strong> (<a class="reference external" href="https://docs.scipy.org/doc/numpy/reference/generated/numpy.ndarray.html#numpy.ndarray" title="(in NumPy v1.12)"><code class="xref py py-class docutils literal"><span class="pre">numpy.ndarray</span></code></a>) – Array of longitudes</li> +<li><strong>fname</strong> (<a class="reference external" href="https://docs.python.org/2/library/string.html#module-string" title="(in Python v2.7)"><code class="xref py py-mod docutils literal"><span class="pre">string</span></code></a>) – The filename of the plot.</li> +<li><strong>fmt</strong> (<a class="reference external" href="https://docs.python.org/2/library/string.html#module-string" title="(in Python v2.7)"><code class="xref py py-mod docutils literal"><span class="pre">string</span></code></a>) – (Optional) filetype for the output.</li> +<li><strong>gridshape</strong> (<a class="reference external" href="https://docs.python.org/2/library/functions.html#tuple" title="(in Python v2.7)"><code class="xref py py-func docutils literal"><span class="pre">tuple()</span></code></a> of the form (num_rows, num_cols)) – (Optional) tuple denoting the desired grid shape (num_rows, num_cols) for arranging the subplots.</li> -<li><strong>clabel</strong> (<a class="reference external" href="http://docs.python.org/2/library/string.html#module-string" title="(in Python v2.7)"><code class="xref py py-mod docutils literal"><span class="pre">string</span></code></a>) – (Optional) colorbar title.</li> -<li><strong>ptitle</strong> (<a class="reference external" href="http://docs.python.org/2/library/string.html#module-string" title="(in Python v2.7)"><code class="xref py py-mod docutils literal"><span class="pre">string</span></code></a>) – (Optional) plot title.</li> -<li><strong>subtitles</strong> (<a class="reference external" href="http://docs.python.org/2/library/functions.html#list" title="(in Python v2.7)"><code class="xref py py-class docutils literal"><span class="pre">list</span></code></a> of <a class="reference external" href="http://docs.python.org/2/library/string.html#module-string" title="(in Python v2.7)"><code class="xref py py-mod docutils literal"><span class="pre">string</span></code></a>) – (Optional) list of titles for each subplot.</li> -<li><strong>cmap</strong> (<a class="reference external" href="http://docs.python.org/2/library/string.html#module-string" title="(in Python v2.7)"><code class="xref py py-mod docutils literal"><span class="pre">string</span></code></a> or <a class="reference external" href="http://matplotlib.sourceforge.net/api/colors_api.html#matplotlib.colors.LinearSegmentedColormap" title="(in Matplotlib v1.5.1)"><code class="xref py py-class docutils literal"><span class="pre">matplotlib.colors.LinearSegmentedColormap</span></code></a>) – (Optional) string or <a class="reference external" href="http://matplotlib.sourceforge.net/api/colors_api.html#matplotlib.colors.LinearSegmentedColormap" title="(in Matplotlib v1.5.1)"><code class="xref py py-class docutils literal"><span class="pre">matplotlib.colors.LinearSegmentedColormap</span></code></a> +<li><strong>clabel</strong> (<a class="reference external" href="https://docs.python.org/2/library/string.html#module-string" title="(in Python v2.7)"><code class="xref py py-mod docutils literal"><span class="pre">string</span></code></a>) – (Optional) colorbar title.</li> +<li><strong>ptitle</strong> (<a class="reference external" href="https://docs.python.org/2/library/string.html#module-string" title="(in Python v2.7)"><code class="xref py py-mod docutils literal"><span class="pre">string</span></code></a>) – (Optional) plot title.</li> +<li><strong>subtitles</strong> (<a class="reference external" href="https://docs.python.org/2/library/functions.html#list" title="(in Python v2.7)"><code class="xref py py-class docutils literal"><span class="pre">list</span></code></a> of <a class="reference external" href="https://docs.python.org/2/library/string.html#module-string" title="(in Python v2.7)"><code class="xref py py-mod docutils literal"><span class="pre">string</span></code></a>) – (Optional) list of titles for each subplot.</li> +<li><strong>cmap</strong> (<a class="reference external" href="https://docs.python.org/2/library/string.html#module-string" title="(in Python v2.7)"><code class="xref py py-mod docutils literal"><span class="pre">string</span></code></a> or <a class="reference external" href="http://matplotlib.org/api/colors_api.html#matplotlib.colors.LinearSegmentedColormap" title="(in Matplotlib v2.0.0)"><code class="xref py py-class docutils literal"><span class="pre">matplotlib.colors.LinearSegmentedColormap</span></code></a>) – (Optional) string or <a class="reference external" href="http://matplotlib.org/api/colors_api.html#matplotlib.colors.LinearSegmentedColormap" title="(in Matplotlib v2.0.0)"><code class="xref py py-class docutils literal"><span class="pre">matplotlib.colors.LinearSegmentedColormap</span></code></a> instance denoting the colormap. This must be able to be recognized by <a class="reference external" href="http://matplotlib.org/api/cm_api.html#matplotlib.cm.get_cmap">Matplotlib’s get_cmap function</a>.</li> -<li><strong>clevs</strong> (<a class="reference external" href="http://docs.python.org/2/library/functions.html#list" title="(in Python v2.7)"><code class="xref py py-class docutils literal"><span class="pre">list</span></code></a> of <a class="reference external" href="http://docs.python.org/2/library/functions.html#int" title="(in Python v2.7)"><code class="xref py py-class docutils literal"><span class="pre">int</span></code></a> or <a class="reference external" href="http://docs.python.org/2/library/functions.html#float" title="(in Python v2.7)"><code class="xref py py-class docutils literal"><span class="pre">float</span></code></a>) – (Optional) contour levels values.</li> -<li><strong>nlevs</strong> (<a class="reference external" href="http://docs.python.org/2/library/functions.html#int" title="(in Python v2.7)"><code class="xref py py-class docutils literal"><span class="pre">int</span></code></a>) – (Optional) target number of contour levels if clevs is None.</li> -<li><strong>parallels</strong> (<a class="reference external" href="http://docs.python.org/2/library/functions.html#list" title="(in Python v2.7)"><code class="xref py py-class docutils literal"><span class="pre">list</span></code></a> of <a class="reference external" href="http://docs.python.org/2/library/functions.html#int" title="(in Python v2.7)"><code class="xref py py-class docutils literal"><span class="pre">int</span></code></a> or <a class="reference external" href="http://docs.python.org/2/library/functions.html#float" title="(in Python v2.7)"><code class="xref py py-class docutils literal"><span class="pre">float</span></code></a>) – (Optional) list of ints or floats for the parallels to +<li><strong>clevs</strong> (<a class="reference external" href="https://docs.python.org/2/library/functions.html#list" title="(in Python v2.7)"><code class="xref py py-class docutils literal"><span class="pre">list</span></code></a> of <a class="reference external" href="https://docs.python.org/2/library/functions.html#int" title="(in Python v2.7)"><code class="xref py py-class docutils literal"><span class="pre">int</span></code></a> or <a class="reference external" href="https://docs.python.org/2/library/functions.html#float" title="(in Python v2.7)"><code class="xref py py-class docutils literal"><span class="pre">float</span></code></a>) – (Optional) contour levels values.</li> +<li><strong>nlevs</strong> (<a class="reference external" href="https://docs.python.org/2/library/functions.html#int" title="(in Python v2.7)"><code class="xref py py-class docutils literal"><span class="pre">int</span></code></a>) – (Optional) target number of contour levels if clevs is None.</li> +<li><strong>parallels</strong> (<a class="reference external" href="https://docs.python.org/2/library/functions.html#list" title="(in Python v2.7)"><code class="xref py py-class docutils literal"><span class="pre">list</span></code></a> of <a class="reference external" href="https://docs.python.org/2/library/functions.html#int" title="(in Python v2.7)"><code class="xref py py-class docutils literal"><span class="pre">int</span></code></a> or <a class="reference external" href="https://docs.python.org/2/library/functions.html#float" title="(in Python v2.7)"><code class="xref py py-class docutils literal"><span class="pre">float</span></code></a>) – (Optional) list of ints or floats for the parallels to be drawn. See the <a class="reference external" href="http://matplotlib.org/basemap/users/graticule.html">Basemap documentation</a> for additional information.</li> -<li><strong>meridians</strong> (<a class="reference external" href="http://docs.python.org/2/library/functions.html#list" title="(in Python v2.7)"><code class="xref py py-class docutils literal"><span class="pre">list</span></code></a> of <a class="reference external" href="http://docs.python.org/2/library/functions.html#int" title="(in Python v2.7)"><code class="xref py py-class docutils literal"><span class="pre">int</span></code></a> or <a class="reference external" href="http://docs.python.org/2/library/functions.html#float" title="(in Python v2.7)"><code class="xref py py-class docutils literal"><span class="pre">float</span></code></a>) – <p>(Optional) list of ints or floats for the meridians to +<li><strong>meridians</strong> (<a class="reference external" href="https://docs.python.org/2/library/functions.html#list" title="(in Python v2.7)"><code class="xref py py-class docutils literal"><span class="pre">list</span></code></a> of <a class="reference external" href="https://docs.python.org/2/library/functions.html#int" title="(in Python v2.7)"><code class="xref py py-class docutils literal"><span class="pre">int</span></code></a> or <a class="reference external" href="https://docs.python.org/2/library/functions.html#float" title="(in Python v2.7)"><code class="xref py py-class docutils literal"><span class="pre">float</span></code></a>) – <p>(Optional) list of ints or floats for the meridians to be drawn. See the <a class="reference external" href="http://matplotlib.org/basemap/users/graticule.html">Basemap documentation</a> for additional information.</p> </li> -<li><strong>extend</strong> (<a class="reference external" href="http://docs.python.org/2/library/string.html#module-string" title="(in Python v2.7)"><code class="xref py py-mod docutils literal"><span class="pre">string</span></code></a>) – (Optional) flag to toggle whether to place arrows at the colorbar +<li><strong>extend</strong> (<a class="reference external" href="https://docs.python.org/2/library/string.html#module-string" title="(in Python v2.7)"><code class="xref py py-mod docutils literal"><span class="pre">string</span></code></a>) – (Optional) flag to toggle whether to place arrows at the colorbar boundaries. Default is ‘neither’, but can also be ‘min’, ‘max’, or ‘both’. Will be automatically set to ‘both’ if clevs is None.</li> </ul> @@ -196,6 +180,31 @@ fname - a string specifying the filenam </dd></dl> <dl class="function"> +<dt id="plotter.draw_plot_to_compare_trends"> +<code class="descclassname">plotter.</code><code class="descname">draw_plot_to_compare_trends</code><span class="sig-paren">(</span><em>obs_data</em>, <em>ens_data</em>, <em>model_data</em>, <em>fname</em>, <em>fmt='png'</em>, <em>ptitle=''</em>, <em>data_labels=None</em>, <em>xlabel=''</em>, <em>ylabel=''</em><span class="sig-paren">)</span><a class="headerlink" href="#plotter.draw_plot_to_compare_trends" title="Permalink to this definition">¶</a></dt> +<dd><p>Fill the States over the contiguous US with colors</p> +<table class="docutils field-list" frame="void" rules="none"> +<col class="field-name" /> +<col class="field-body" /> +<tbody valign="top"> +<tr class="field-odd field"><th class="field-name">Parameters:</th><td class="field-body"><ul class="first last simple"> +<li><strong>obs_data</strong> (<em>:class:'numpy.ndarray'</em>) – An array of observed trend and standard errors for regions</li> +<li><strong>ens_data</strong> (<em>: class:'numpy.ndarray'</em>) – An array of trend and standard errors from a multi-model ensemble for regions</li> +<li><strong>model_data</strong> (<em>: class:'numpy.ndarray'</em>) – An array of trends from models for regions</li> +<li><strong>fname</strong> (<a class="reference external" href="https://docs.python.org/2/library/string.html#module-string" title="(in Python v2.7)"><code class="xref py py-mod docutils literal"><span class="pre">string</span></code></a>) – The filename of the plot.</li> +<li><strong>fmt</strong> (<a class="reference external" href="https://docs.python.org/2/library/string.html#module-string" title="(in Python v2.7)"><code class="xref py py-mod docutils literal"><span class="pre">string</span></code></a>) – (Optional) filetype for the output.</li> +<li><strong>ptitle</strong> (<a class="reference external" href="https://docs.python.org/2/library/string.html#module-string" title="(in Python v2.7)"><code class="xref py py-mod docutils literal"><span class="pre">string</span></code></a>) – (Optional) plot title.</li> +<li><strong>data_labels</strong> (<code class="xref py py-mod docutils literal"><span class="pre">list</span></code>) – (Optional) names of the regions</li> +<li><strong>xlabel</strong> (<a class="reference external" href="https://docs.python.org/2/library/string.html#module-string" title="(in Python v2.7)"><code class="xref py py-mod docutils literal"><span class="pre">string</span></code></a>) – (Optional) a label for x-axis</li> +<li><strong>ylabel</strong> (<a class="reference external" href="https://docs.python.org/2/library/string.html#module-string" title="(in Python v2.7)"><code class="xref py py-mod docutils literal"><span class="pre">string</span></code></a>) – (Optional) a label for y-axis</li> +</ul> +</td> +</tr> +</tbody> +</table> +</dd></dl> + +<dl class="function"> <dt id="plotter.draw_portrait_diagram"> <code class="descclassname">plotter.</code><code class="descname">draw_portrait_diagram</code><span class="sig-paren">(</span><em>results</em>, <em>rowlabels</em>, <em>collabels</em>, <em>fname</em>, <em>fmt='png'</em>, <em>gridshape=(1</em>, <em>1)</em>, <em>xlabel=''</em>, <em>ylabel=''</em>, <em>clabel=''</em>, <em>ptitle=''</em>, <em>subtitles=None</em>, <em>cmap=None</em>, <em>clevs=None</em>, <em>nlevs=10</em>, <em>extend='neither'</em>, <em>aspect=None</em><span class="sig-paren">)</span><a class="headerlink" href="#plotter.draw_portrait_diagram" title="Permalink to this definition">¶</a></dt> <dd><p>Draw a portrait diagram plot.</p> @@ -204,30 +213,30 @@ fname - a string specifying the filenam <col class="field-body" /> <tbody valign="top"> <tr class="field-odd field"><th class="field-name">Parameters:</th><td class="field-body"><ul class="first last simple"> -<li><strong>results</strong> (<a class="reference external" href="http://docs.scipy.org/doc/numpy/reference/generated/numpy.ndarray.html#numpy.ndarray" title="(in NumPy v1.11)"><code class="xref py py-class docutils literal"><span class="pre">numpy.ndarray</span></code></a>) – 3D array of the fields to be plotted. The second dimension +<li><strong>results</strong> (<a class="reference external" href="https://docs.scipy.org/doc/numpy/reference/generated/numpy.ndarray.html#numpy.ndarray" title="(in NumPy v1.12)"><code class="xref py py-class docutils literal"><span class="pre">numpy.ndarray</span></code></a>) – 3D array of the fields to be plotted. The second dimension should correspond to the number of rows in the diagram and the third should correspond to the number of columns.</li> -<li><strong>rowlabels</strong> (<a class="reference external" href="http://docs.python.org/2/library/functions.html#list" title="(in Python v2.7)"><code class="xref py py-class docutils literal"><span class="pre">list</span></code></a> of <a class="reference external" href="http://docs.python.org/2/library/string.html#module-string" title="(in Python v2.7)"><code class="xref py py-mod docutils literal"><span class="pre">string</span></code></a>) – Labels for each row.</li> -<li><strong>collabels</strong> (<a class="reference external" href="http://docs.python.org/2/library/functions.html#list" title="(in Python v2.7)"><code class="xref py py-class docutils literal"><span class="pre">list</span></code></a> of <a class="reference external" href="http://docs.python.org/2/library/string.html#module-string" title="(in Python v2.7)"><code class="xref py py-mod docutils literal"><span class="pre">string</span></code></a>) – Labels for each row.</li> -<li><strong>fname</strong> (<a class="reference external" href="http://docs.python.org/2/library/string.html#module-string" title="(in Python v2.7)"><code class="xref py py-mod docutils literal"><span class="pre">string</span></code></a>) – Filename of the plot.</li> -<li><strong>fmt</strong> (<a class="reference external" href="http://docs.python.org/2/library/string.html#module-string" title="(in Python v2.7)"><code class="xref py py-mod docutils literal"><span class="pre">string</span></code></a>) – (Optional) filetype for the output.</li> -<li><strong>gridshape</strong> (<a class="reference external" href="http://docs.python.org/2/library/functions.html#tuple" title="(in Python v2.7)"><code class="xref py py-func docutils literal"><span class="pre">tuple()</span></code></a> of the form (num_rows, num_cols)) – (Optional) tuple denoting the desired grid shape +<li><strong>rowlabels</strong> (<a class="reference external" href="https://docs.python.org/2/library/functions.html#list" title="(in Python v2.7)"><code class="xref py py-class docutils literal"><span class="pre">list</span></code></a> of <a class="reference external" href="https://docs.python.org/2/library/string.html#module-string" title="(in Python v2.7)"><code class="xref py py-mod docutils literal"><span class="pre">string</span></code></a>) – Labels for each row.</li> +<li><strong>collabels</strong> (<a class="reference external" href="https://docs.python.org/2/library/functions.html#list" title="(in Python v2.7)"><code class="xref py py-class docutils literal"><span class="pre">list</span></code></a> of <a class="reference external" href="https://docs.python.org/2/library/string.html#module-string" title="(in Python v2.7)"><code class="xref py py-mod docutils literal"><span class="pre">string</span></code></a>) – Labels for each row.</li> +<li><strong>fname</strong> (<a class="reference external" href="https://docs.python.org/2/library/string.html#module-string" title="(in Python v2.7)"><code class="xref py py-mod docutils literal"><span class="pre">string</span></code></a>) – Filename of the plot.</li> +<li><strong>fmt</strong> (<a class="reference external" href="https://docs.python.org/2/library/string.html#module-string" title="(in Python v2.7)"><code class="xref py py-mod docutils literal"><span class="pre">string</span></code></a>) – (Optional) filetype for the output.</li> +<li><strong>gridshape</strong> (<a class="reference external" href="https://docs.python.org/2/library/functions.html#tuple" title="(in Python v2.7)"><code class="xref py py-func docutils literal"><span class="pre">tuple()</span></code></a> of the form (num_rows, num_cols)) – (Optional) tuple denoting the desired grid shape (num_rows, num_cols) for arranging the subplots.</li> -<li><strong>xlabel</strong> (<a class="reference external" href="http://docs.python.org/2/library/string.html#module-string" title="(in Python v2.7)"><code class="xref py py-mod docutils literal"><span class="pre">string</span></code></a>) – (Optional) x-axis title.</li> -<li><strong>ylabel</strong> (<a class="reference external" href="http://docs.python.org/2/library/string.html#module-string" title="(in Python v2.7)"><code class="xref py py-mod docutils literal"><span class="pre">string</span></code></a>) – (Optional) y-ayis title.</li> -<li><strong>clabel</strong> (<a class="reference external" href="http://docs.python.org/2/library/string.html#module-string" title="(in Python v2.7)"><code class="xref py py-mod docutils literal"><span class="pre">string</span></code></a>) – (Optional) colorbar title.</li> -<li><strong>ptitle</strong> (<a class="reference external" href="http://docs.python.org/2/library/string.html#module-string" title="(in Python v2.7)"><code class="xref py py-mod docutils literal"><span class="pre">string</span></code></a>) – (Optional) plot title.</li> -<li><strong>subtitles</strong> (<a class="reference external" href="http://docs.python.org/2/library/functions.html#list" title="(in Python v2.7)"><code class="xref py py-class docutils literal"><span class="pre">list</span></code></a> of <a class="reference external" href="http://docs.python.org/2/library/string.html#module-string" title="(in Python v2.7)"><code class="xref py py-mod docutils literal"><span class="pre">string</span></code></a>) – (Optional) list of titles for each subplot.</li> -<li><strong>cmap</strong> (<a class="reference external" href="http://docs.python.org/2/library/string.html#module-string" title="(in Python v2.7)"><code class="xref py py-mod docutils literal"><span class="pre">string</span></code></a> or <a class="reference external" href="http://matplotlib.sourceforge.net/api/colors_api.html#matplotlib.colors.LinearSegmentedColormap" title="(in Matplotlib v1.5.1)"><code class="xref py py-class docutils literal"><span class="pre">matplotlib.colors.LinearSegmentedColormap</span></code></a>) – <p>(Optional) string or <a class="reference external" href="http://matplotlib.sourceforge.net/api/colors_api.html#matplotlib.colors.LinearSegmentedColormap" title="(in Matplotlib v1.5.1)"><code class="xref py py-class docutils literal"><span class="pre">matplotlib.colors.LinearSegmentedColormap</span></code></a> +<li><strong>xlabel</strong> (<a class="reference external" href="https://docs.python.org/2/library/string.html#module-string" title="(in Python v2.7)"><code class="xref py py-mod docutils literal"><span class="pre">string</span></code></a>) – (Optional) x-axis title.</li> +<li><strong>ylabel</strong> (<a class="reference external" href="https://docs.python.org/2/library/string.html#module-string" title="(in Python v2.7)"><code class="xref py py-mod docutils literal"><span class="pre">string</span></code></a>) – (Optional) y-ayis title.</li> +<li><strong>clabel</strong> (<a class="reference external" href="https://docs.python.org/2/library/string.html#module-string" title="(in Python v2.7)"><code class="xref py py-mod docutils literal"><span class="pre">string</span></code></a>) – (Optional) colorbar title.</li> +<li><strong>ptitle</strong> (<a class="reference external" href="https://docs.python.org/2/library/string.html#module-string" title="(in Python v2.7)"><code class="xref py py-mod docutils literal"><span class="pre">string</span></code></a>) – (Optional) plot title.</li> +<li><strong>subtitles</strong> (<a class="reference external" href="https://docs.python.org/2/library/functions.html#list" title="(in Python v2.7)"><code class="xref py py-class docutils literal"><span class="pre">list</span></code></a> of <a class="reference external" href="https://docs.python.org/2/library/string.html#module-string" title="(in Python v2.7)"><code class="xref py py-mod docutils literal"><span class="pre">string</span></code></a>) – (Optional) list of titles for each subplot.</li> +<li><strong>cmap</strong> (<a class="reference external" href="https://docs.python.org/2/library/string.html#module-string" title="(in Python v2.7)"><code class="xref py py-mod docutils literal"><span class="pre">string</span></code></a> or <a class="reference external" href="http://matplotlib.org/api/colors_api.html#matplotlib.colors.LinearSegmentedColormap" title="(in Matplotlib v2.0.0)"><code class="xref py py-class docutils literal"><span class="pre">matplotlib.colors.LinearSegmentedColormap</span></code></a>) – <p>(Optional) string or <a class="reference external" href="http://matplotlib.org/api/colors_api.html#matplotlib.colors.LinearSegmentedColormap" title="(in Matplotlib v2.0.0)"><code class="xref py py-class docutils literal"><span class="pre">matplotlib.colors.LinearSegmentedColormap</span></code></a> instance denoting the colormap. This must be able to be recognized by <a class="reference external" href="http://matplotlib.org/api/cm_api.html#matplotlib.cm.get_cmap">Matplotlib’s get_cmap function</a>.</p> </li> -<li><strong>clevs</strong> (<a class="reference external" href="http://docs.python.org/2/library/functions.html#list" title="(in Python v2.7)"><code class="xref py py-class docutils literal"><span class="pre">list</span></code></a> of <a class="reference external" href="http://docs.python.org/2/library/functions.html#int" title="(in Python v2.7)"><code class="xref py py-class docutils literal"><span class="pre">int</span></code></a> or <a class="reference external" href="http://docs.python.org/2/library/functions.html#float" title="(in Python v2.7)"><code class="xref py py-class docutils literal"><span class="pre">float</span></code></a>) – (Optional) contour levels values.</li> -<li><strong>nlevs</strong> (<a class="reference external" href="http://docs.python.org/2/library/functions.html#int" title="(in Python v2.7)"><code class="xref py py-class docutils literal"><span class="pre">int</span></code></a>) – Optional target number of contour levels if clevs is None.</li> -<li><strong>extend</strong> (<a class="reference external" href="http://docs.python.org/2/library/string.html#module-string" title="(in Python v2.7)"><code class="xref py py-mod docutils literal"><span class="pre">string</span></code></a>) – (Optional) flag to toggle whether to place arrows at the colorbar +<li><strong>clevs</strong> (<a class="reference external" href="https://docs.python.org/2/library/functions.html#list" title="(in Python v2.7)"><code class="xref py py-class docutils literal"><span class="pre">list</span></code></a> of <a class="reference external" href="https://docs.python.org/2/library/functions.html#int" title="(in Python v2.7)"><code class="xref py py-class docutils literal"><span class="pre">int</span></code></a> or <a class="reference external" href="https://docs.python.org/2/library/functions.html#float" title="(in Python v2.7)"><code class="xref py py-class docutils literal"><span class="pre">float</span></code></a>) – (Optional) contour levels values.</li> +<li><strong>nlevs</strong> (<a class="reference external" href="https://docs.python.org/2/library/functions.html#int" title="(in Python v2.7)"><code class="xref py py-class docutils literal"><span class="pre">int</span></code></a>) – Optional target number of contour levels if clevs is None.</li> +<li><strong>extend</strong> (<a class="reference external" href="https://docs.python.org/2/library/string.html#module-string" title="(in Python v2.7)"><code class="xref py py-mod docutils literal"><span class="pre">string</span></code></a>) – (Optional) flag to toggle whether to place arrows at the colorbar boundaries. Default is ‘neither’, but can also be ‘min’, ‘max’, or ‘both’. Will be automatically set to ‘both’ if clevs is None.</li> -<li><strong>aspect</strong> (<a class="reference external" href="http://docs.python.org/2/library/functions.html#float" title="(in Python v2.7)"><code class="xref py py-class docutils literal"><span class="pre">float</span></code></a>) – (Optional) approximate aspect ratio of each subplot +<li><strong>aspect</strong> (<a class="reference external" href="https://docs.python.org/2/library/functions.html#float" title="(in Python v2.7)"><code class="xref py py-class docutils literal"><span class="pre">float</span></code></a>) – (Optional) approximate aspect ratio of each subplot (width / height). Default is 8.5 / 5.5</li> </ul> </td> @@ -237,6 +246,32 @@ boundaries. Default is ‘neither </dd></dl> <dl class="function"> +<dt id="plotter.draw_precipitation_JPDF"> +<code class="descclassname">plotter.</code><code class="descname">draw_precipitation_JPDF</code><span class="sig-paren">(</span><em>plot_data, plot_level, x_ticks, x_names, y_ticks, y_names, output_file, title=None, diff_plot=False, cmap=<matplotlib.colors.LinearSegmentedColormap object>, cbar_ticks=[0.01, 0.1, 0.5, 2, 5, 25], cbar_label=['0.01', '0.10', '0.5', '2', '5', '25']</em><span class="sig-paren">)</span><a class="headerlink" href="#plotter.draw_precipitation_JPDF" title="Permalink to this definition">¶</a></dt> +<dd><table class="docutils field-list" frame="void" rules="none"> +<col class="field-name" /> +<col class="field-body" /> +<tbody valign="top"> +<tr class="field-odd field"><th class="field-name">Parameters:</th><td class="field-body"><ul class="first last simple"> +<li><strong>plot_data</strong> (<em>:class:'numpy.ndarray'</em>) – a numpy array of data to plot (dimY, dimX)</li> +<li><strong>plot_level</strong> (<em>:class:'numpy.ndarray'</em>) – levels to plot</li> +<li><strong>x_ticks</strong> (<em>:class:'numpy.ndarray'</em>) – x values where tick makrs are located</li> +<li><strong>x_names</strong> (<em>:class:'list'</em>) – labels for the ticks on x-axis (dimX)</li> +<li><strong>y_ticks</strong> (<em>:class:'numpy.ndarray'</em>) – y values where tick makrs are located</li> +<li><strong>y_names</strong> (<em>:class:'list'</em>) – labels for the ticks on y-axis (dimY)</li> +<li><strong>output_file</strong> (<em>:mod:'string'</em>) – name of output png file</li> +<li><strong>title</strong> (<em>:mod:'string'</em>) – (Optional) title of the plot</li> +<li><strong>diff_plot</strong> (<em>:mod:'bool'</em>) – (Optional) if true, a difference plot will be generated</li> +<li><strong>cbar_ticks</strong> (<em>:class:'list'</em>) – (Optional) tick marks for the color bar</li> +<li><strong>cbar_label</strong> (<em>:class:'list'</em>) – (Optional) lables for the tick marks of the color bar</li> +</ul> +</td> +</tr> +</tbody> +</table> +</dd></dl> + +<dl class="function"> <dt id="plotter.draw_subregions"> <code class="descclassname">plotter.</code><code class="descname">draw_subregions</code><span class="sig-paren">(</span><em>subregions</em>, <em>lats</em>, <em>lons</em>, <em>fname</em>, <em>fmt='png'</em>, <em>ptitle=''</em>, <em>parallels=None</em>, <em>meridians=None</em>, <em>subregion_masks=None</em><span class="sig-paren">)</span><a class="headerlink" href="#plotter.draw_subregions" title="Permalink to this definition">¶</a></dt> <dd><p>Draw subregion domain(s) on a map.</p> @@ -245,21 +280,21 @@ boundaries. Default is ‘neither <col class="field-body" /> <tbody valign="top"> <tr class="field-odd field"><th class="field-name">Parameters:</th><td class="field-body"><ul class="first last simple"> -<li><strong>subregions</strong> (<a class="reference external" href="http://docs.python.org/2/library/functions.html#list" title="(in Python v2.7)"><code class="xref py py-class docutils literal"><span class="pre">list</span></code></a> of subregion objects (Bounds objects)) – The subregion objects to plot on the map.</li> -<li><strong>lats</strong> (<a class="reference external" href="http://docs.scipy.org/doc/numpy/reference/generated/numpy.ndarray.html#numpy.ndarray" title="(in NumPy v1.11)"><code class="xref py py-class docutils literal"><span class="pre">numpy.ndarray</span></code></a>) – Array of latitudes values.</li> -<li><strong>lons</strong> (<a class="reference external" href="http://docs.scipy.org/doc/numpy/reference/generated/numpy.ndarray.html#numpy.ndarray" title="(in NumPy v1.11)"><code class="xref py py-class docutils literal"><span class="pre">numpy.ndarray</span></code></a>) – Array of longitudes values.</li> -<li><strong>fname</strong> (<a class="reference external" href="http://docs.python.org/2/library/string.html#module-string" title="(in Python v2.7)"><code class="xref py py-mod docutils literal"><span class="pre">string</span></code></a>) – The filename of the plot.</li> -<li><strong>fmt</strong> (<a class="reference external" href="http://docs.python.org/2/library/string.html#module-string" title="(in Python v2.7)"><code class="xref py py-mod docutils literal"><span class="pre">string</span></code></a>) – (Optional) filetype for the output.</li> -<li><strong>ptitle</strong> (<a class="reference external" href="http://docs.python.org/2/library/string.html#module-string" title="(in Python v2.7)"><code class="xref py py-mod docutils literal"><span class="pre">string</span></code></a>) – (Optional) plot title.</li> -<li><strong>parallels</strong> (<a class="reference external" href="http://docs.python.org/2/library/functions.html#list" title="(in Python v2.7)"><code class="xref py py-class docutils literal"><span class="pre">list</span></code></a> of <a class="reference external" href="http://docs.python.org/2/library/functions.html#int" title="(in Python v2.7)"><code class="xref py py-class docutils literal"><span class="pre">int</span></code></a> or <a class="reference external" href="http://docs.python.org/2/library/functions.html#float" title="(in Python v2.7)"><code class="xref py py-class docutils literal"><span class="pre">float</span></code></a>) – <p>(Optional) <a class="reference external" href="http://docs.python.org/2/library/functions.html#list" title="(in Python v2.7)"><code class="xref py py-class docutils literal"><span class="pre">list</span></code></a> of <a class="reference external" href="http://docs.python.org/2/library/functions.html#int" title="(in Python v2.7)"><co de class="xref py py-class docutils literal"><span class="pre">int</span></code></a> or <a class="reference external" href="http://docs.python.org/2/library/functions.html#float" title="(in Python v2.7)"><code class="xref py py-class docutils literal"><span class="pre">float</span></code></a> for the parallels to +<li><strong>subregions</strong> (<a class="reference external" href="https://docs.python.org/2/library/functions.html#list" title="(in Python v2.7)"><code class="xref py py-class docutils literal"><span class="pre">list</span></code></a> of subregion objects (Bounds objects)) – The subregion objects to plot on the map.</li> +<li><strong>lats</strong> (<a class="reference external" href="https://docs.scipy.org/doc/numpy/reference/generated/numpy.ndarray.html#numpy.ndarray" title="(in NumPy v1.12)"><code class="xref py py-class docutils literal"><span class="pre">numpy.ndarray</span></code></a>) – Array of latitudes values.</li> +<li><strong>lons</strong> (<a class="reference external" href="https://docs.scipy.org/doc/numpy/reference/generated/numpy.ndarray.html#numpy.ndarray" title="(in NumPy v1.12)"><code class="xref py py-class docutils literal"><span class="pre">numpy.ndarray</span></code></a>) – Array of longitudes values.</li> +<li><strong>fname</strong> (<a class="reference external" href="https://docs.python.org/2/library/string.html#module-string" title="(in Python v2.7)"><code class="xref py py-mod docutils literal"><span class="pre">string</span></code></a>) – The filename of the plot.</li> +<li><strong>fmt</strong> (<a class="reference external" href="https://docs.python.org/2/library/string.html#module-string" title="(in Python v2.7)"><code class="xref py py-mod docutils literal"><span class="pre">string</span></code></a>) – (Optional) filetype for the output.</li> +<li><strong>ptitle</strong> (<a class="reference external" href="https://docs.python.org/2/library/string.html#module-string" title="(in Python v2.7)"><code class="xref py py-mod docutils literal"><span class="pre">string</span></code></a>) – (Optional) plot title.</li> +<li><strong>parallels</strong> (<a class="reference external" href="https://docs.python.org/2/library/functions.html#list" title="(in Python v2.7)"><code class="xref py py-class docutils literal"><span class="pre">list</span></code></a> of <a class="reference external" href="https://docs.python.org/2/library/functions.html#int" title="(in Python v2.7)"><code class="xref py py-class docutils literal"><span class="pre">int</span></code></a> or <a class="reference external" href="https://docs.python.org/2/library/functions.html#float" title="(in Python v2.7)"><code class="xref py py-class docutils literal"><span class="pre">float</span></code></a>) – <p>(Optional) <a class="reference external" href="https://docs.python.org/2/library/functions.html#list" title="(in Python v2.7)"><code class="xref py py-class docutils literal"><span class="pre">list</span></code></a> of <a class="reference external" href="https://docs.python.org/2/library/functions.html#int" title="(in Python v2.7) "><code class="xref py py-class docutils literal"><span class="pre">int</span></code></a> or <a class="reference external" href="https://docs.python.org/2/library/functions.html#float" title="(in Python v2.7)"><code class="xref py py-class docutils literal"><span class="pre">float</span></code></a> for the parallels to be drawn. See the <a class="reference external" href="http://matplotlib.org/basemap/users/graticule.html">Basemap documentation</a> for additional information.</p> </li> -<li><strong>meridians</strong> (<a class="reference external" href="http://docs.python.org/2/library/functions.html#list" title="(in Python v2.7)"><code class="xref py py-class docutils literal"><span class="pre">list</span></code></a> of <a class="reference external" href="http://docs.python.org/2/library/functions.html#int" title="(in Python v2.7)"><code class="xref py py-class docutils literal"><span class="pre">int</span></code></a> or <a class="reference external" href="http://docs.python.org/2/library/functions.html#float" title="(in Python v2.7)"><code class="xref py py-class docutils literal"><span class="pre">float</span></code></a>) – <p>(Optional) <a class="reference external" href="http://docs.python.org/2/library/functions.html#list" title="(in Python v2.7)"><code class="xref py py-class docutils literal"><span class="pre">list</span></code></a> of <a class="reference external" href="http://docs.python.org/2/library/functions.html#int" title="(in Python v2.7)"><co de class="xref py py-class docutils literal"><span class="pre">int</span></code></a> or <a class="reference external" href="http://docs.python.org/2/library/functions.html#float" title="(in Python v2.7)"><code class="xref py py-class docutils literal"><span class="pre">float</span></code></a> for the meridians to +<li><strong>meridians</strong> (<a class="reference external" href="https://docs.python.org/2/library/functions.html#list" title="(in Python v2.7)"><code class="xref py py-class docutils literal"><span class="pre">list</span></code></a> of <a class="reference external" href="https://docs.python.org/2/library/functions.html#int" title="(in Python v2.7)"><code class="xref py py-class docutils literal"><span class="pre">int</span></code></a> or <a class="reference external" href="https://docs.python.org/2/library/functions.html#float" title="(in Python v2.7)"><code class="xref py py-class docutils literal"><span class="pre">float</span></code></a>) – <p>(Optional) <a class="reference external" href="https://docs.python.org/2/library/functions.html#list" title="(in Python v2.7)"><code class="xref py py-class docutils literal"><span class="pre">list</span></code></a> of <a class="reference external" href="https://docs.python.org/2/library/functions.html#int" title="(in Python v2.7) "><code class="xref py py-class docutils literal"><span class="pre">int</span></code></a> or <a class="reference external" href="https://docs.python.org/2/library/functions.html#float" title="(in Python v2.7)"><code class="xref py py-class docutils literal"><span class="pre">float</span></code></a> for the meridians to be drawn. See the <a class="reference external" href="http://matplotlib.org/basemap/users/graticule.html">Basemap documentation</a> for additional information.</p> </li> -<li><strong>subregion_masks</strong> (<a class="reference external" href="http://docs.python.org/2/library/stdtypes.html#dict" title="(in Python v2.7)"><code class="xref py py-class docutils literal"><span class="pre">dict</span></code></a> of <a class="reference external" href="http://docs.python.org/2/library/functions.html#bool" title="(in Python v2.7)"><code class="xref py py-class docutils literal"><span class="pre">bool</span></code></a> arrays) – (Optional) <a class="reference external" href="http://docs.python.org/2/library/stdtypes.html#dict" title="(in Python v2.7)"><code class="xref py py-class docutils literal"><span class="pre">dict</span></code></a> of <a class="reference external" href="http://docs.python.org/2/library/functions.html#bool" title="(in Python v2.7)"><code class="xref py py-class docutils literal"><span class="pre">bool</span></code></a> arrays for each +<li><strong>subregion_masks</strong> (<a class="reference external" href="https://docs.python.org/2/library/stdtypes.html#dict" title="(in Python v2.7)"><code class="xref py py-class docutils literal"><span class="pre">dict</span></code></a> of <a class="reference external" href="https://docs.python.org/2/library/functions.html#bool" title="(in Python v2.7)"><code class="xref py py-class docutils literal"><span class="pre">bool</span></code></a> arrays) – (Optional) <a class="reference external" href="https://docs.python.org/2/library/stdtypes.html#dict" title="(in Python v2.7)"><code class="xref py py-class docutils literal"><span class="pre">dict</span></code></a> of <a class="reference external" href="https://docs.python.org/2/library/functions.html#bool" title="(in Python v2.7)"><code class="xref py py-class docutils literal"><span class="pre">bool</span></code></a> arrays for each subregion for giving finer control of the domain to be drawn, by default the entire domain is drawn.</li> </ul> @@ -278,23 +313,23 @@ the entire domain is drawn.</li> <col class="field-body" /> <tbody valign="top"> <tr class="field-odd field"><th class="field-name">Parameters:</th><td class="field-body"><ul class="first last simple"> -<li><strong>results</strong> (<a class="reference external" href="http://docs.scipy.org/doc/numpy/reference/generated/numpy.ndarray.html#numpy.ndarray" title="(in NumPy v1.11)"><code class="xref py py-class docutils literal"><span class="pre">numpy.ndarray</span></code></a>) – An Nx2 array containing normalized standard deviations, +<li><strong>results</strong> (<a class="reference external" href="https://docs.scipy.org/doc/numpy/reference/generated/numpy.ndarray.html#numpy.ndarray" title="(in NumPy v1.12)"><code class="xref py py-class docutils literal"><span class="pre">numpy.ndarray</span></code></a>) – An Nx2 array containing normalized standard deviations, correlation coefficients, and names of evaluation results.</li> -<li><strong>names</strong> (<a class="reference external" href="http://docs.python.org/2/library/functions.html#list" title="(in Python v2.7)"><code class="xref py py-class docutils literal"><span class="pre">list</span></code></a> of <a class="reference external" href="http://docs.python.org/2/library/string.html#module-string" title="(in Python v2.7)"><code class="xref py py-mod docutils literal"><span class="pre">string</span></code></a>) – A list of names for each evaluated dataset</li> -<li><strong>refname</strong> (<a class="reference external" href="http://docs.python.org/2/library/string.html#module-string" title="(in Python v2.7)"><code class="xref py py-mod docutils literal"><span class="pre">string</span></code></a>) – The name of the reference dataset.</li> -<li><strong>fname</strong> (<a class="reference external" href="http://docs.python.org/2/library/string.html#module-string" title="(in Python v2.7)"><code class="xref py py-mod docutils literal"><span class="pre">string</span></code></a>) – The filename of the plot.</li> -<li><strong>fmt</strong> (<a class="reference external" href="http://docs.python.org/2/library/string.html#module-string" title="(in Python v2.7)"><code class="xref py py-mod docutils literal"><span class="pre">string</span></code></a>) – (Optional) filetype for the output plot.</li> +<li><strong>names</strong> (<a class="reference external" href="https://docs.python.org/2/library/functions.html#list" title="(in Python v2.7)"><code class="xref py py-class docutils literal"><span class="pre">list</span></code></a> of <a class="reference external" href="https://docs.python.org/2/library/string.html#module-string" title="(in Python v2.7)"><code class="xref py py-mod docutils literal"><span class="pre">string</span></code></a>) – A list of names for each evaluated dataset</li> +<li><strong>refname</strong> (<a class="reference external" href="https://docs.python.org/2/library/string.html#module-string" title="(in Python v2.7)"><code class="xref py py-mod docutils literal"><span class="pre">string</span></code></a>) – The name of the reference dataset.</li> +<li><strong>fname</strong> (<a class="reference external" href="https://docs.python.org/2/library/string.html#module-string" title="(in Python v2.7)"><code class="xref py py-mod docutils literal"><span class="pre">string</span></code></a>) – The filename of the plot.</li> +<li><strong>fmt</strong> (<a class="reference external" href="https://docs.python.org/2/library/string.html#module-string" title="(in Python v2.7)"><code class="xref py py-mod docutils literal"><span class="pre">string</span></code></a>) – (Optional) filetype for the output plot.</li> <li><strong>gridshape</strong> (A <code class="xref py py-class docutils literal"><span class="pre">tuple</span></code> of the form (num_rows, num_cols)) – (Optional) Tuple denoting the desired grid shape (num_rows, num_cols) for arranging the subplots.</li> -<li><strong>ptitle</strong> (<a class="reference external" href="http://docs.python.org/2/library/string.html#module-string" title="(in Python v2.7)"><code class="xref py py-mod docutils literal"><span class="pre">string</span></code></a>) – (Optional) plot title.</li> -<li><strong>subtitles</strong> (<a class="reference external" href="http://docs.python.org/2/library/functions.html#list" title="(in Python v2.7)"><code class="xref py py-class docutils literal"><span class="pre">list</span></code></a> of <a class="reference external" href="http://docs.python.org/2/library/string.html#module-string" title="(in Python v2.7)"><code class="xref py py-mod docutils literal"><span class="pre">string</span></code></a>) – (Optional) list of strings specifying the title for each +<li><strong>ptitle</strong> (<a class="reference external" href="https://docs.python.org/2/library/string.html#module-string" title="(in Python v2.7)"><code class="xref py py-mod docutils literal"><span class="pre">string</span></code></a>) – (Optional) plot title.</li> +<li><strong>subtitles</strong> (<a class="reference external" href="https://docs.python.org/2/library/functions.html#list" title="(in Python v2.7)"><code class="xref py py-class docutils literal"><span class="pre">list</span></code></a> of <a class="reference external" href="https://docs.python.org/2/library/string.html#module-string" title="(in Python v2.7)"><code class="xref py py-mod docutils literal"><span class="pre">string</span></code></a>) – (Optional) list of strings specifying the title for each subplot.</li> -<li><strong>pos</strong> (<a class="reference external" href="http://docs.python.org/2/library/string.html#module-string" title="(in Python v2.7)"><code class="xref py py-mod docutils literal"><span class="pre">string</span></code></a> or <a class="reference external" href="http://docs.python.org/2/library/functions.html#tuple" title="(in Python v2.7)"><code class="xref py py-func docutils literal"><span class="pre">tuple()</span></code></a> of <a class="reference external" href="http://docs.python.org/2/library/functions.html#float" title="(in Python v2.7)"><code class="xref py py-class docutils literal"><span class="pre">float</span></code></a>) – (Optional) string or tuple of floats used to set the position +<li><strong>pos</strong> (<a class="reference external" href="https://docs.python.org/2/library/string.html#module-string" title="(in Python v2.7)"><code class="xref py py-mod docutils literal"><span class="pre">string</span></code></a> or <a class="reference external" href="https://docs.python.org/2/library/functions.html#tuple" title="(in Python v2.7)"><code class="xref py py-func docutils literal"><span class="pre">tuple()</span></code></a> of <a class="reference external" href="https://docs.python.org/2/library/functions.html#float" title="(in Python v2.7)"><code class="xref py py-class docutils literal"><span class="pre">float</span></code></a>) – (Optional) string or tuple of floats used to set the position of the legend. Check the <a class="reference external" href="http://matplotlib.org/api/legend_api.html#matplotlib.legend.Legend">Matplotlib docs</a> for additional information.</li> -<li><strong>frameon</strong> (<a class="reference external" href="http://docs.python.org/2/library/functions.html#bool" title="(in Python v2.7)"><code class="xref py py-class docutils literal"><span class="pre">bool</span></code></a>) – (Optional) boolean specifying whether to draw a frame +<li><strong>frameon</strong> (<a class="reference external" href="https://docs.python.org/2/library/functions.html#bool" title="(in Python v2.7)"><code class="xref py py-class docutils literal"><span class="pre">bool</span></code></a>) – (Optional) boolean specifying whether to draw a frame around the legend box.</li> -<li><strong>radmax</strong> (<a class="reference external" href="http://docs.python.org/2/library/functions.html#float" title="(in Python v2.7)"><code class="xref py py-class docutils literal"><span class="pre">float</span></code></a>) – (Optional) float to adjust the extent of the axes in terms of +<li><strong>radmax</strong> (<a class="reference external" href="https://docs.python.org/2/library/functions.html#float" title="(in Python v2.7)"><code class="xref py py-class docutils literal"><span class="pre">float</span></code></a>) – (Optional) float to adjust the extent of the axes in terms of standard deviation.</li> </ul> </td> @@ -312,23 +347,23 @@ standard deviation.</li> <col class="field-body" /> <tbody valign="top"> <tr class="field-odd field"><th class="field-name">Parameters:</th><td class="field-body"><ul class="first last simple"> -<li><strong>results</strong> (<a class="reference external" href="http://docs.scipy.org/doc/numpy/reference/generated/numpy.ndarray.html#numpy.ndarray" title="(in NumPy v1.11)"><code class="xref py py-class docutils literal"><span class="pre">numpy.ndarray</span></code></a>) – 3D array of time series data.</li> -<li><strong>times</strong> (<a class="reference external" href="http://docs.python.org/2/library/functions.html#list" title="(in Python v2.7)"><code class="xref py py-class docutils literal"><span class="pre">list</span></code></a> of <a class="reference external" href="http://docs.python.org/2/library/datetime.html#datetime.datetime" title="(in Python v2.7)"><code class="xref py py-class docutils literal"><span class="pre">datetime.datetime</span></code></a>) – List of Python datetime objects used by Matplotlib to handle +<li><strong>results</strong> (<a class="reference external" href="https://docs.scipy.org/doc/numpy/reference/generated/numpy.ndarray.html#numpy.ndarray" title="(in NumPy v1.12)"><code class="xref py py-class docutils literal"><span class="pre">numpy.ndarray</span></code></a>) – 3D array of time series data.</li> +<li><strong>times</strong> (<a class="reference external" href="https://docs.python.org/2/library/functions.html#list" title="(in Python v2.7)"><code class="xref py py-class docutils literal"><span class="pre">list</span></code></a> of <a class="reference external" href="https://docs.python.org/2/library/datetime.html#datetime.datetime" title="(in Python v2.7)"><code class="xref py py-class docutils literal"><span class="pre">datetime.datetime</span></code></a>) – List of Python datetime objects used by Matplotlib to handle axis formatting.</li> -<li><strong>labels</strong> (<a class="reference external" href="http://docs.python.org/2/library/functions.html#list" title="(in Python v2.7)"><code class="xref py py-class docutils literal"><span class="pre">list</span></code></a> of <a class="reference external" href="http://docs.python.org/2/library/string.html#module-string" title="(in Python v2.7)"><code class="xref py py-mod docutils literal"><span class="pre">string</span></code></a>) – List of names for each data being plotted.</li> -<li><strong>fname</strong> (<a class="reference external" href="http://docs.python.org/2/library/string.html#module-string" title="(in Python v2.7)"><code class="xref py py-mod docutils literal"><span class="pre">string</span></code></a>) – Filename of the plot.</li> -<li><strong>fmt</strong> (<a class="reference external" href="http://docs.python.org/2/library/string.html#module-string" title="(in Python v2.7)"><code class="xref py py-mod docutils literal"><span class="pre">string</span></code></a>) – (Optional) filetype for the output.</li> -<li><strong>gridshape</strong> (<a class="reference external" href="http://docs.python.org/2/library/functions.html#tuple" title="(in Python v2.7)"><code class="xref py py-func docutils literal"><span class="pre">tuple()</span></code></a> of the form (num_rows, num_cols)) – (Optional) tuple denoting the desired grid shape +<li><strong>labels</strong> (<a class="reference external" href="https://docs.python.org/2/library/functions.html#list" title="(in Python v2.7)"><code class="xref py py-class docutils literal"><span class="pre">list</span></code></a> of <a class="reference external" href="https://docs.python.org/2/library/string.html#module-string" title="(in Python v2.7)"><code class="xref py py-mod docutils literal"><span class="pre">string</span></code></a>) – List of names for each data being plotted.</li> +<li><strong>fname</strong> (<a class="reference external" href="https://docs.python.org/2/library/string.html#module-string" title="(in Python v2.7)"><code class="xref py py-mod docutils literal"><span class="pre">string</span></code></a>) – Filename of the plot.</li> +<li><strong>fmt</strong> (<a class="reference external" href="https://docs.python.org/2/library/string.html#module-string" title="(in Python v2.7)"><code class="xref py py-mod docutils literal"><span class="pre">string</span></code></a>) – (Optional) filetype for the output.</li> +<li><strong>gridshape</strong> (<a class="reference external" href="https://docs.python.org/2/library/functions.html#tuple" title="(in Python v2.7)"><code class="xref py py-func docutils literal"><span class="pre">tuple()</span></code></a> of the form (num_rows, num_cols)) – (Optional) tuple denoting the desired grid shape (num_rows, num_cols) for arranging the subplots.</li> -<li><strong>xlabel</strong> (<a class="reference external" href="http://docs.python.org/2/library/string.html#module-string" title="(in Python v2.7)"><code class="xref py py-mod docutils literal"><span class="pre">string</span></code></a>) – (Optional) x-axis title.</li> -<li><strong>ylabel</strong> (<a class="reference external" href="http://docs.python.org/2/library/string.html#module-string" title="(in Python v2.7)"><code class="xref py py-mod docutils literal"><span class="pre">string</span></code></a>) – (Optional) y-axis title.</li> -<li><strong>ptitle</strong> (<a class="reference external" href="http://docs.python.org/2/library/string.html#module-string" title="(in Python v2.7)"><code class="xref py py-mod docutils literal"><span class="pre">string</span></code></a>) – (Optional) plot title.</li> -<li><strong>subtitles</strong> (<a class="reference external" href="http://docs.python.org/2/library/functions.html#list" title="(in Python v2.7)"><code class="xref py py-class docutils literal"><span class="pre">list</span></code></a> of <a class="reference external" href="http://docs.python.org/2/library/string.html#module-string" title="(in Python v2.7)"><code class="xref py py-mod docutils literal"><span class="pre">string</span></code></a>) – (Optional) list of titles for each subplot.</li> -<li><strong>label_month</strong> (<a class="reference external" href="http://docs.python.org/2/library/functions.html#bool" title="(in Python v2.7)"><code class="xref py py-class docutils literal"><span class="pre">bool</span></code></a>) – (Optional) flag to toggle drawing month labels on the +<li><strong>xlabel</strong> (<a class="reference external" href="https://docs.python.org/2/library/string.html#module-string" title="(in Python v2.7)"><code class="xref py py-mod docutils literal"><span class="pre">string</span></code></a>) – (Optional) x-axis title.</li> +<li><strong>ylabel</strong> (<a class="reference external" href="https://docs.python.org/2/library/string.html#module-string" title="(in Python v2.7)"><code class="xref py py-mod docutils literal"><span class="pre">string</span></code></a>) – (Optional) y-axis title.</li> +<li><strong>ptitle</strong> (<a class="reference external" href="https://docs.python.org/2/library/string.html#module-string" title="(in Python v2.7)"><code class="xref py py-mod docutils literal"><span class="pre">string</span></code></a>) – (Optional) plot title.</li> +<li><strong>subtitles</strong> (<a class="reference external" href="https://docs.python.org/2/library/functions.html#list" title="(in Python v2.7)"><code class="xref py py-class docutils literal"><span class="pre">list</span></code></a> of <a class="reference external" href="https://docs.python.org/2/library/string.html#module-string" title="(in Python v2.7)"><code class="xref py py-mod docutils literal"><span class="pre">string</span></code></a>) – (Optional) list of titles for each subplot.</li> +<li><strong>label_month</strong> (<a class="reference external" href="https://docs.python.org/2/library/functions.html#bool" title="(in Python v2.7)"><code class="xref py py-class docutils literal"><span class="pre">bool</span></code></a>) – (Optional) flag to toggle drawing month labels on the x-axis.</li> -<li><strong>yscale</strong> (<a class="reference external" href="http://docs.python.org/2/library/string.html#module-string" title="(in Python v2.7)"><code class="xref py py-mod docutils literal"><span class="pre">string</span></code></a>) – (Optional) y-axis scale value, ‘linear’ for linear and ‘log’ +<li><strong>yscale</strong> (<a class="reference external" href="https://docs.python.org/2/library/string.html#module-string" title="(in Python v2.7)"><code class="xref py py-mod docutils literal"><span class="pre">string</span></code></a>) – (Optional) y-axis scale value, ‘linear’ for linear and ‘log’ for log base 10.</li> -<li><strong>aspect</strong> (<a class="reference external" href="http://docs.python.org/2/library/functions.html#float" title="(in Python v2.7)"><code class="xref py py-class docutils literal"><span class="pre">float</span></code></a>) – (Optional) approximate aspect ratio of each subplot +<li><strong>aspect</strong> (<a class="reference external" href="https://docs.python.org/2/library/functions.html#float" title="(in Python v2.7)"><code class="xref py py-class docutils literal"><span class="pre">float</span></code></a>) – (Optional) approximate aspect ratio of each subplot (width / height). Default is 8.5 / 5.5</li> </ul> </td> @@ -338,6 +373,31 @@ for log base 10.</li> </dd></dl> <dl class="function"> +<dt id="plotter.fill_US_states_with_color"> +<code class="descclassname">plotter.</code><code class="descname">fill_US_states_with_color</code><span class="sig-paren">(</span><em>regions</em>, <em>fname</em>, <em>fmt='png'</em>, <em>ptitle=''</em>, <em>colors=False</em>, <em>values=None</em>, <em>region_names=None</em><span class="sig-paren">)</span><a class="headerlink" href="#plotter.fill_US_states_with_color" title="Permalink to this definition">¶</a></dt> +<dd><p>Fill the States over the contiguous US with colors</p> +<table class="docutils field-list" frame="void" rules="none"> +<col class="field-name" /> +<col class="field-body" /> +<tbody valign="top"> +<tr class="field-odd field"><th class="field-name">Parameters:</th><td class="field-body"><ul class="first last simple"> +<li><strong>regions</strong> (<a class="reference external" href="https://docs.python.org/2/library/functions.html#list" title="(in Python v2.7)"><code class="xref py py-class docutils literal"><span class="pre">list</span></code></a>) – The list of subregions(lists of US States) to be filled +with different colors.</li> +<li><strong>fname</strong> (<a class="reference external" href="https://docs.python.org/2/library/string.html#module-string" title="(in Python v2.7)"><code class="xref py py-mod docutils literal"><span class="pre">string</span></code></a>) – The filename of the plot.</li> +<li><strong>fmt</strong> (<a class="reference external" href="https://docs.python.org/2/library/string.html#module-string" title="(in Python v2.7)"><code class="xref py py-mod docutils literal"><span class="pre">string</span></code></a>) – (Optional) filetype for the output.</li> +<li><strong>ptitle</strong> (<a class="reference external" href="https://docs.python.org/2/library/string.html#module-string" title="(in Python v2.7)"><code class="xref py py-mod docutils literal"><span class="pre">string</span></code></a>) – (Optional) plot title.</li> +<li><strong>colors</strong> (<a class="reference external" href="https://docs.python.org/2/library/functions.html#bool" title="(in Python v2.7)"><code class="xref py py-class docutils literal"><span class="pre">bool</span></code></a>) – (Optional) : If True, each region will be filled +with different colors without using values</li> +<li><strong>values</strong> (<a class="reference external" href="https://docs.scipy.org/doc/numpy/reference/generated/numpy.ndarray.html#numpy.ndarray" title="(in NumPy v1.12)"><code class="xref py py-class docutils literal"><span class="pre">numpy.ndarray</span></code></a>) – (Optional) : If colors==False, color for each region scales +an associated element in values</li> +</ul> +</td> +</tr> +</tbody> +</table> +</dd></dl> + +<dl class="function"> <dt id="plotter.set_cmap"> <code class="descclassname">plotter.</code><code class="descname">set_cmap</code><span class="sig-paren">(</span><em>name</em><span class="sig-paren">)</span><a class="headerlink" href="#plotter.set_cmap" title="Permalink to this definition">¶</a></dt> <dd><p>Sets the default colormap (eg when setting cmap=None in a function) @@ -349,7 +409,7 @@ version of it.</p> <col class="field-name" /> <col class="field-body" /> <tbody valign="top"> -<tr class="field-odd field"><th class="field-name">Parameters:</th><td class="field-body"><strong>name</strong> (<a class="reference external" href="http://docs.python.org/2/library/string.html#module-string" title="(in Python v2.7)"><code class="xref py py-mod docutils literal"><span class="pre">string</span></code></a>) – The name of the colormap.</td> +<tr class="field-odd field"><th class="field-name">Parameters:</th><td class="field-body"><strong>name</strong> (<a class="reference external" href="https://docs.python.org/2/library/string.html#module-string" title="(in Python v2.7)"><code class="xref py py-mod docutils literal"><span class="pre">string</span></code></a>) – The name of the colormap.</td> </tr> </tbody> </table> @@ -365,13 +425,15 @@ version of it.</p> <div class="sphinxsidebarwrapper"> <p class="logo"><a href="../index.html"> <img class="logo" src="../_static/ocw-logo-variant-sm-01-01-new.png" alt="Logo"/> - </a></p> - <h4>Previous topic</h4> - <p class="topless"><a href="metrics.html" - title="previous chapter">Metrics Module</a></p> - <h4>Next topic</h4> - <p class="topless"><a href="utils.html" - title="next chapter">Utils Module</a></p> + </a></p><div class="relations"> +<h3>Related Topics</h3> +<ul> + <li><a href="../index.html">Documentation overview</a><ul> + <li>Previous: <a href="metrics.html" title="previous chapter">Metrics Module</a></li> + <li>Next: <a href="utils.html" title="next chapter">Utils Module</a></li> + </ul></li> +</ul> +</div> <div role="note" aria-label="source link"> <h3>This Page</h3> <ul class="this-page-menu"> @@ -382,14 +444,11 @@ version of it.</p> <div id="searchbox" style="display: none" role="search"> <h3>Quick search</h3> <form class="search" action="../search.html" method="get"> - <input type="text" name="q" /> - <input type="submit" value="Go" /> + <div><input type="text" name="q" /></div> + <div><input type="submit" value="Go" /></div> <input type="hidden" name="check_keywords" value="yes" /> <input type="hidden" name="area" value="default" /> </form> - <p class="searchtip" style="font-size: 90%"> - Enter search terms or a module, class or function name. - </p> </div> <script type="text/javascript">$('#searchbox').show(0);</script> </div> @@ -400,12 +459,12 @@ version of it.</p> ©2016, Apache Software Foundation. | - Powered by <a href="http://sphinx-doc.org/">Sphinx 1.3.1</a> - & <a href="https://github.com/bitprophet/alabaster">Alabaster 0.7.4</a> + Powered by <a href="http://sphinx-doc.org/">Sphinx 1.4.8</a> + & <a href="https://github.com/bitprophet/alabaster">Alabaster 0.7.9</a> | <a href="../_sources/ocw/plotter.txt" - rel="nofollow">Page source</a></li> + rel="nofollow">Page source</a> </div>