.. only:: html .. note:: :class: sphx-glr-download-link-note Click :ref:`here ` to download the full example code .. rst-class:: sphx-glr-example-title .. _sphx_glr_auto_examples_plot_plot_mosaic.py: Mosaic Plot Example ========================================== .. image:: /auto_examples/plot/images/sphx_glr_plot_mosaic_001.png :alt: plot mosaic :class: sphx-glr-single-img .. code-block:: default import matplotlib.pyplot as plt from dabl.datasets import load_titanic from dabl.plot import mosaic_plot data = load_titanic() # Mosaic plot for frequencies of Titanic passengers grouped # by gender and survival status mosaic_plot(data, 'sex', 'survived') plt.show() .. rst-class:: sphx-glr-timing **Total running time of the script:** ( 0 minutes 0.073 seconds) .. _sphx_glr_download_auto_examples_plot_plot_mosaic.py: .. only :: html .. container:: sphx-glr-footer :class: sphx-glr-footer-example .. container:: sphx-glr-download sphx-glr-download-python :download:`Download Python source code: plot_mosaic.py ` .. container:: sphx-glr-download sphx-glr-download-jupyter :download:`Download Jupyter notebook: plot_mosaic.ipynb ` .. only:: html .. rst-class:: sphx-glr-signature `Gallery generated by Sphinx-Gallery `_