<p dir="auto">I submitted this to the mailing list, but I've since realized that this is probably a better place for it. So sorry for the double-post.</p>
<p dir="auto">I've been wanting for some time the option to make stacked histograms using the <code class="notranslate">step</code> or <code class="notranslate">stepfilled</code> histtypes. I've started working on this in a fork, but I wanted to solicit some opinions on how to change the function call.</p>
<p dir="auto">The most straightforward thing to do would be to add two new histtypes: <code class="notranslate">stepstacked</code> and <code class="notranslate">stepfilledstacked</code>, bringing the total number of possible histtypes to 6. However, that feels kind of clunky.</p>
<p dir="auto">I'd like to propose that instead of increasing the number of histtypes, I add a new boolean kwarg called <code class="notranslate">stacked</code> which controls whether or not the histogram gets stacked. We then don't need to increase the number of histtypes. The <code class="notranslate">barstacked</code> histtype becomes redundant, as it's identical to <code class="notranslate">histtype='bar', stacked=True</code>, but I'll leave it in for backwards compatibility, to eventually be deprecated.</p>
<p dir="auto">While I'm at it, filling a step histogram by using a different histtype (<code class="notranslate">stepfilled</code>) seems clunky and inconsistent with how one would deal with a bar histogram. To control the fill for a bar histogram, one uses the <code class="notranslate">fill</code> kwarg, which gets passed to the patch collection. I'd propose that we use the <code class="notranslate">fill</code> kwarg in a similar way for the step histogram and eliminate the <code class="notranslate">stepfilled</code> histtype.</p>
<p dir="auto">In sumarry, here are the changes I'd like to make, as they would be reflected in the docstring</p>
<div class="highlight highlight-source-python notranslate position-relative overflow-auto" dir="auto" data-snippet-clipboard-copy-content="&quot;&quot;&quot;
         *histtype*: [ 'bar'  | 'step' ]
           The type of histogram to draw.

         *fill*:
           If *True*, the histogram will be filled.
           If *False* only the edges of the histogram will be drawn.

         *stacked*:
           If *True*, multiple data are stacked on top of each other
           If *False* multiple data are aranged side by side if
               histtype is 'bar' or on top of each other if histtype is 'step'
&quot;&quot;&quot;"><pre class="notranslate"><span class="pl-s">"""</span>
<span class="pl-s">         *histtype*: [ 'bar'  | 'step' ]</span>
<span class="pl-s">           The type of histogram to draw.</span>
<span class="pl-s"></span>
<span class="pl-s">         *fill*:</span>
<span class="pl-s">           If *True*, the histogram will be filled.</span>
<span class="pl-s">           If *False* only the edges of the histogram will be drawn.</span>
<span class="pl-s"></span>
<span class="pl-s">         *stacked*:</span>
<span class="pl-s">           If *True*, multiple data are stacked on top of each other</span>
<span class="pl-s">           If *False* multiple data are aranged side by side if</span>
<span class="pl-s">               histtype is 'bar' or on top of each other if histtype is 'step'</span>
<span class="pl-s">"""</span></pre></div>
<p dir="auto">We can of course leave in the <code class="notranslate">barstacked</code> and <code class="notranslate">stepfilled</code> histtypes for backwards compatability.</p>
<p dir="auto">So, are there opinions on wether this proposal seems like a good idea? I'm mostly interested in getting stacked step histograms, which I've already implemented, but it seems like I might as well clean up the function call while I'm at it. If others agree that changing the function call is a good idea, I'll be happy to implement it and include it in my pull request.</p>
<p dir="auto"><a href="https://github.com/matplotlib/matplotlib/blob/master/lib/matplotlib/backends/backend_webagg.py#L54">https://github.com/matplotlib/matplotlib/blob/master/lib/matplotlib/backends/backend_webagg.py#L54</a></p>
<p dir="auto">flake8 testing of <a href="https://github.com/matplotlib/matplotlib">https://github.com/matplotlib/matplotlib</a> on Python 3.6.4</p>
<p dir="auto">$ <strong>flake8 . --count --select=E901,E999,F821,F822,F823 --show-source --statistics</strong></p>
<div class="snippet-clipboard-content notranslate position-relative overflow-auto" data-snippet-clipboard-copy-content="./lib/matplotlib/backends/backend_webagg.py:54:9: F821 undefined name 'show'
        show()
        ^"><pre class="notranslate"><code class="notranslate">./lib/matplotlib/backends/backend_webagg.py:54:9: F821 undefined name 'show'
        show()
        ^
</code></pre></div>