.. DO NOT EDIT. .. THIS FILE WAS AUTOMATICALLY GENERATED BY SPHINX-GALLERY. .. TO MAKE CHANGES, EDIT THE SOURCE PYTHON FILE: .. "recipes/bar_chart/plot_bar_chart.py" .. LINE NUMBERS ARE GIVEN BELOW. .. only:: html .. note:: :class: sphx-glr-download-link-note :ref:`Go to the end ` to download the full example code. .. rst-class:: sphx-glr-example-title .. _sphx_glr_recipes_bar_chart_plot_bar_chart.py: Basic Bar Chart --------------------------- Generate a bar chart with 2 series and general x and y-axis configurations via the ``chart`` function. - Each ``series`` references a column of the input dataframe. - The series argument ``mode="bar"`` indicates that the series is a bar chart to plot - Multiple series are placed next to each other and not stacked by default. .. GENERATED FROM PYTHON SOURCE LINES 12-38 .. raw:: html


.. code-block:: Python import pandas as pd from visualization_toolkit.helpers.plotly import chart, axis, series fig = chart( pdf, x_axis=axis(column_name="fiscal_qy", label="Fiscal Quarter"), y1_axis=axis(label="Downloads", axis_type="number"), chart_series=[ series( column_name="ucan", label="UCAN", color="dark-blue", mode="bar", ), series( column_name="china", label="China", color="light-blue", mode="bar", ), ], ) fig .. rst-class:: sphx-glr-timing **Total running time of the script:** (0 minutes 0.019 seconds) .. _sphx_glr_download_recipes_bar_chart_plot_bar_chart.py: .. only:: html .. container:: sphx-glr-footer sphx-glr-footer-example .. container:: sphx-glr-download sphx-glr-download-jupyter :download:`Download Jupyter notebook: plot_bar_chart.ipynb ` .. container:: sphx-glr-download sphx-glr-download-python :download:`Download Python source code: plot_bar_chart.py ` .. container:: sphx-glr-download sphx-glr-download-zip :download:`Download zipped: plot_bar_chart.zip ` .. only:: html .. rst-class:: sphx-glr-signature `Gallery generated by Sphinx-Gallery `_