.. _book_fig_chapter5_fig_bayes_blocks: Distribution Representation Comparison -------------------------------------- Figure 5.21 Comparison of Knuth's histogram and a Bayesian blocks histogram. The adaptive bin widths of the Bayesian blocks histogram yield a better representation of the underlying data, especially with fewer points. .. image:: ../images/chapter5/fig_bayes_blocks_1.png :scale: 100 :align: center .. raw:: html
**Code output:** .. raw:: html
.. literalinclude:: fig_bayes_blocks.txt .. raw:: html
**Python source code:** .. raw:: html
.. literalinclude:: fig_bayes_blocks.py :lines: 10- .. raw:: html
:download:`[download source: fig_bayes_blocks.py] ` .. raw:: html