<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"> <html xmlns="http://www.w3.org/1999/xhtml"> <head> <meta http-equiv="Content-Type" content="text/html; charset=utf-8" /> <title>mpl_toolkits.axes_grid.axes_size — Matplotlib 1.2.0 documentation</title> <link rel="stylesheet" href="../../../_static/mpl.css" type="text/css" /> <link rel="stylesheet" href="../../../_static/pygments.css" type="text/css" /> <script type="text/javascript"> var DOCUMENTATION_OPTIONS = { URL_ROOT: '../../../', VERSION: '1.2.0', COLLAPSE_INDEX: false, FILE_SUFFIX: '.html', HAS_SOURCE: true }; </script> <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="search" type="application/opensearchdescription+xml" title="Search within Matplotlib 1.2.0 documentation" href="../../../_static/opensearch.xml"/> <link rel="top" title="Matplotlib 1.2.0 documentation" href="../../../index.html" /> <link rel="up" title="The Matplotlib AxesGrid Toolkit API" href="index.html" /> <link rel="next" title="mpl_toolkits.axes_grid.axes_divider" href="axes_divider_api.html" /> <link rel="prev" title="The Matplotlib AxesGrid Toolkit API" href="index.html" /> </head> <body> <!-- Piwik --> <script type="text/javascript"> if ("matplotlib.sourceforge.net" == document.location.hostname || "matplotlib.sf.net" == document.location.hostname) { var pkBaseURL = (("https:" == document.location.protocol) ? "https://apps.sourceforge.net/piwik/matplotlib/" : "http://apps.sourceforge.net/piwik/matplotlib/"); document.write(unescape("%3Cscript src='" + pkBaseURL + "piwik.js' type='text/javascript'%3E%3C/script%3E")); } </script> <script type="text/javascript"> if ("matplotlib.sourceforge.net" == document.location.hostname || "matplotlib.sf.net" == document.location.hostname) { piwik_action_name = ''; piwik_idsite = 1; piwik_url = pkBaseURL + "piwik.php"; piwik_log(piwik_action_name, piwik_idsite, piwik_url); document.write(unescape('%3Cobject%3E%3Cnoscript%3E%3Cp%3E%3Cimg src="http://apps.sourceforge.net/piwik/matplotlib/piwik.php?idsite=1" alt="piwik"/%3E%3C/p%3E%3C/noscript%3E%3C/object%3E')); } </script> <!-- End Piwik Tag --> <link rel="shortcut icon" href="_static/favicon.ico"> <div style="background-color: white; text-align: left; padding: 10px 10px 15px 15px"> <a href="../../../index.html"><img src="../../../_static/logo2.png" border="0" alt="matplotlib"/></a> </div> <div class="related"> <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="../../../py-modindex.html" title="Python Module Index" >modules</a> |</li> <li class="right" > <a href="axes_divider_api.html" title="mpl_toolkits.axes_grid.axes_divider" accesskey="N">next</a> |</li> <li class="right" > <a href="index.html" title="The Matplotlib AxesGrid Toolkit API" accesskey="P">previous</a> |</li> <li><a href="../../../index.html">home</a>| </li> <li><a href="../../../search.html">search</a>| </li> <li><a href="../../../examples/index.html">examples</a>| </li> <li><a href="../../../gallery.html">gallery</a>| </li> <li><a href="../../../contents.html">docs</a> »</li> <li><a href="../../index.html" >Toolkits</a> »</li> <li><a href="../index.html" >Matplotlib AxesGrid Toolkit</a> »</li> <li><a href="index.html" accesskey="U">The Matplotlib AxesGrid Toolkit API</a> »</li> </ul> </div> <div class="sphinxsidebar"> <div class="sphinxsidebarwrapper"> <h4>Previous topic</h4> <p class="topless"><a href="index.html" title="previous chapter">The Matplotlib AxesGrid Toolkit API</a></p> <h4>Next topic</h4> <p class="topless"><a href="axes_divider_api.html" title="next chapter"><tt class="docutils literal docutils literal docutils literal"><span class="pre">mpl_toolkits.axes_grid.axes_divider</span></tt></a></p> <h3>This Page</h3> <ul class="this-page-menu"> <li><a href="../../../_sources/mpl_toolkits/axes_grid/api/axes_size_api.txt" rel="nofollow">Show Source</a></li> </ul> <div id="searchbox" style="display: none"> <h3>Quick search</h3> <form class="search" action="../../../search.html" method="get"> <input type="text" name="q" /> <input type="submit" value="Go" /> <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> </div> <div class="document"> <div class="documentwrapper"> <div class="bodywrapper"> <div class="body"> <div class="section" id="module-mpl_toolkits.axes_grid.axes_size"> <span id="mpl-toolkits-axes-grid-axes-size"></span><h1><a class="reference internal" href="#module-mpl_toolkits.axes_grid.axes_size" title="mpl_toolkits.axes_grid.axes_size"><tt class="xref py py-mod docutils literal"><span class="pre">mpl_toolkits.axes_grid.axes_size</span></tt></a><a class="headerlink" href="#module-mpl_toolkits.axes_grid.axes_size" title="Permalink to this headline">¶</a></h1> <dl class="class"> <dt id="mpl_toolkits.axes_grid.axes_size.Fixed"> <em class="property">class </em><tt class="descclassname">mpl_toolkits.axes_grid.axes_size.</tt><tt class="descname">Fixed</tt><big>(</big><em>fixed_size</em><big>)</big><a class="headerlink" href="#mpl_toolkits.axes_grid.axes_size.Fixed" title="Permalink to this definition">¶</a></dt> <dd><p>Simple fixed size with absolute part = <em>fixed_size</em> and relative part = 0</p> </dd></dl> <dl class="class"> <dt id="mpl_toolkits.axes_grid.axes_size.Scaled"> <em class="property">class </em><tt class="descclassname">mpl_toolkits.axes_grid.axes_size.</tt><tt class="descname">Scaled</tt><big>(</big><em>scalable_size</em><big>)</big><a class="headerlink" href="#mpl_toolkits.axes_grid.axes_size.Scaled" title="Permalink to this definition">¶</a></dt> <dd><p>Simple scaled(?) size with absolute part = 0 and relative part = <em>scalable_size</em></p> </dd></dl> <dl class="class"> <dt id="mpl_toolkits.axes_grid.axes_size.AxesX"> <em class="property">class </em><tt class="descclassname">mpl_toolkits.axes_grid.axes_size.</tt><tt class="descname">AxesX</tt><big>(</big><em>axes</em>, <em>aspect=1.0</em><big>)</big><a class="headerlink" href="#mpl_toolkits.axes_grid.axes_size.AxesX" title="Permalink to this definition">¶</a></dt> <dd><p>Scaled size whose relative part corresponds to the data width of the <em>axes</em> multiplied by the <em>aspect</em>.</p> </dd></dl> <dl class="class"> <dt id="mpl_toolkits.axes_grid.axes_size.AxesY"> <em class="property">class </em><tt class="descclassname">mpl_toolkits.axes_grid.axes_size.</tt><tt class="descname">AxesY</tt><big>(</big><em>axes</em>, <em>aspect=1.0</em><big>)</big><a class="headerlink" href="#mpl_toolkits.axes_grid.axes_size.AxesY" title="Permalink to this definition">¶</a></dt> <dd><p>Scaled size whose relative part corresponds to the data height of the <em>axes</em> multiplied by the <em>aspect</em>.</p> </dd></dl> <dl class="class"> <dt id="mpl_toolkits.axes_grid.axes_size.MaxWidth"> <em class="property">class </em><tt class="descclassname">mpl_toolkits.axes_grid.axes_size.</tt><tt class="descname">MaxWidth</tt><big>(</big><em>artist_list</em><big>)</big><a class="headerlink" href="#mpl_toolkits.axes_grid.axes_size.MaxWidth" title="Permalink to this definition">¶</a></dt> <dd><p>Size whose absolute part is the largest width of the given <em>artist_list</em>.</p> </dd></dl> <dl class="class"> <dt id="mpl_toolkits.axes_grid.axes_size.MaxHeight"> <em class="property">class </em><tt class="descclassname">mpl_toolkits.axes_grid.axes_size.</tt><tt class="descname">MaxHeight</tt><big>(</big><em>artist_list</em><big>)</big><a class="headerlink" href="#mpl_toolkits.axes_grid.axes_size.MaxHeight" title="Permalink to this definition">¶</a></dt> <dd><p>Size whose absolute part is the largest height of the given <em>artist_list</em>.</p> </dd></dl> <dl class="class"> <dt id="mpl_toolkits.axes_grid.axes_size.Fraction"> <em class="property">class </em><tt class="descclassname">mpl_toolkits.axes_grid.axes_size.</tt><tt class="descname">Fraction</tt><big>(</big><em>fraction</em>, <em>ref_size</em><big>)</big><a class="headerlink" href="#mpl_toolkits.axes_grid.axes_size.Fraction" title="Permalink to this definition">¶</a></dt> <dd><p>An instance whose size is a <em>fraction</em> of the <em>ref_size</em>.</p> <div class="highlight-python"><div class="highlight"><pre><span class="gp">>>> </span><span class="n">s</span> <span class="o">=</span> <span class="n">Fraction</span><span class="p">(</span><span class="mf">0.3</span><span class="p">,</span> <span class="n">AxesX</span><span class="p">(</span><span class="n">ax</span><span class="p">))</span> </pre></div> </div> </dd></dl> <dl class="class"> <dt id="mpl_toolkits.axes_grid.axes_size.Padded"> <em class="property">class </em><tt class="descclassname">mpl_toolkits.axes_grid.axes_size.</tt><tt class="descname">Padded</tt><big>(</big><em>size</em>, <em>pad</em><big>)</big><a class="headerlink" href="#mpl_toolkits.axes_grid.axes_size.Padded" title="Permalink to this definition">¶</a></dt> <dd><p>Return a instance where the absolute part of <em>size</em> is increase by the amount of <em>pad</em>.</p> </dd></dl> <dl class="function"> <dt id="mpl_toolkits.axes_grid.axes_size.from_any"> <tt class="descclassname">mpl_toolkits.axes_grid.axes_size.</tt><tt class="descname">from_any</tt><big>(</big><em>size</em>, <em>fraction_ref=None</em><big>)</big><a class="headerlink" href="#mpl_toolkits.axes_grid.axes_size.from_any" title="Permalink to this definition">¶</a></dt> <dd><p>Creates Fixed unit when the first argument is a float, or a Fraction unit if that is a string that ends with %. The second argument is only meaningful when Fraction unit is created.:</p> <div class="highlight-python"><div class="highlight"><pre><span class="gp">>>> </span><span class="n">a</span> <span class="o">=</span> <span class="n">Size</span><span class="o">.</span><span class="n">from_any</span><span class="p">(</span><span class="mf">1.2</span><span class="p">)</span> <span class="c"># => Size.Fixed(1.2)</span> <span class="gp">>>> </span><span class="n">Size</span><span class="o">.</span><span class="n">from_any</span><span class="p">(</span><span class="s">"50%"</span><span class="p">,</span> <span class="n">a</span><span class="p">)</span> <span class="c"># => Size.Fraction(0.5, a)</span> </pre></div> </div> </dd></dl> </div> </div> </div> </div> <div class="clearer"></div> </div> <div class="related"> <h3>Navigation</h3> <ul> <li class="right" style="margin-right: 10px"> <a href="../../../genindex.html" title="General Index" >index</a></li> <li class="right" > <a href="../../../py-modindex.html" title="Python Module Index" >modules</a> |</li> <li class="right" > <a href="axes_divider_api.html" title="mpl_toolkits.axes_grid.axes_divider" >next</a> |</li> <li class="right" > <a href="index.html" title="The Matplotlib AxesGrid Toolkit API" >previous</a> |</li> <li><a href="../../../index.html">home</a>| </li> <li><a href="../../../search.html">search</a>| </li> <li><a href="../../../examples/index.html">examples</a>| </li> <li><a href="../../../gallery.html">gallery</a>| </li> <li><a href="../../../contents.html">docs</a> »</li> <li><a href="../../index.html" >Toolkits</a> »</li> <li><a href="../index.html" >Matplotlib AxesGrid Toolkit</a> »</li> <li><a href="index.html" >The Matplotlib AxesGrid Toolkit API</a> »</li> </ul> </div> <div class="footer"> © Copyright 2012 John Hunter, Darren Dale, Eric Firing, Michael Droettboom and the matplotlib development team. Last updated on Jul 23, 2013. Created using <a href="http://sphinx.pocoo.org/">Sphinx</a> 1.1.3. </div> </body> </html>