
.. DO NOT EDIT.
.. THIS FILE WAS AUTOMATICALLY GENERATED BY SPHINX-GALLERY.
.. TO MAKE CHANGES, EDIT THE SOURCE PYTHON FILE:
.. "plot_types/3D/bar3d_simple.py"
.. LINE NUMBERS ARE GIVEN BELOW.

.. only:: html

    .. meta::
        :keywords: codex

    .. note::
        :class: sphx-glr-download-link-note

        :ref:`Go to the end <sphx_glr_download_plot_types_3D_bar3d_simple.py>`
        to download the full example code.

.. rst-class:: sphx-glr-example-title

.. _sphx_glr_plot_types_3D_bar3d_simple.py:


==========================
bar3d(x, y, z, dx, dy, dz)
==========================

See `~mpl_toolkits.mplot3d.axes3d.Axes3D.bar3d`.

.. GENERATED FROM PYTHON SOURCE LINES 8-30

.. code-block:: Python

    import matplotlib.pyplot as plt
    import numpy as np

    plt.style.use('_mpl-gallery')

    # Make data
    x = [1, 1, 2, 2]
    y = [1, 2, 1, 2]
    z = [0, 0, 0, 0]
    dx = np.ones_like(x)*0.5
    dy = np.ones_like(x)*0.5
    dz = [2, 3, 1, 4]

    # Plot
    fig, ax = plt.subplots(subplot_kw={"projection": "3d"})
    ax.bar3d(x, y, z, dx, dy, dz)

    ax.set(xticklabels=[],
           yticklabels=[],
           zticklabels=[])

    plt.show()


.. _sphx_glr_download_plot_types_3D_bar3d_simple.py:

.. only:: html

  .. container:: sphx-glr-footer sphx-glr-footer-example

    .. container:: sphx-glr-download sphx-glr-download-jupyter

      :download:`Download Jupyter notebook: bar3d_simple.ipynb <bar3d_simple.ipynb>`

    .. container:: sphx-glr-download sphx-glr-download-python

      :download:`Download Python source code: bar3d_simple.py <bar3d_simple.py>`

    .. container:: sphx-glr-download sphx-glr-download-zip

      :download:`Download zipped: bar3d_simple.zip <bar3d_simple.zip>`


.. only:: html

 .. rst-class:: sphx-glr-signature

    `Gallery generated by Sphinx-Gallery <https://sphinx-gallery.github.io>`_
