bars-histograms">5</a>, <strong>plotly</strong> has both <code>add_histogram()</code> and <code>add_bars()</code>. The difference is that <code>add_histogram()</code> performs <em>statistics</em> (i.e., a binning algorithm) dynamically in the web browser, whereas <code>add_bars()</code> requires the bar heights to be pre-specified. That means, to replicate the last example with <code>add_bars()</code>, the number of observations must be computed ahead-of-time.</p>
<div class="sourceCode" id="cb14"><pre clas