.. DO NOT EDIT. .. THIS FILE WAS AUTOMATICALLY GENERATED BY SPHINX-GALLERY. .. TO MAKE CHANGES, EDIT THE SOURCE PYTHON FILE: .. "recipes/line_chart/plot_line_format_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_line_chart_plot_line_format_chart.py: Line Chart Formatting --------------------------- Line charts have different options to control styling behavior. Options are arguments passed to a given ``series`` in the ``chart`` function. - Use ``color`` to control the color of the series. The color names match options from Ernie and our YD style guide. - By default the series `mode` is set to lines for a line chart - The shape argument can control the line shape. The options are ``dash`` for long dashes, ``dot`` for short dashes, or ``spline`` for smooth curve lines. - The `mode` argument can also be set to ``markers`` for plotting only data points and ``lines+markers`` to display both lines and markers at the data point. - By default, line charts are solid lines with no markers or smoothing. .. GENERATED FROM PYTHON SOURCE LINES 14-58 .. 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", shape="dash", ), series( column_name="china", label="China", color="light-blue", shape="spline", ), series( column_name="india", label="India", color="green", mode="lines+markers", ), series( column_name="asia_ex_china", label="Asia ex. China", color="yellow", shape="dot", ), series( column_name="other", label="Other", color="red", mode="markers", ), ], ) fig .. rst-class:: sphx-glr-timing **Total running time of the script:** (0 minutes 0.022 seconds) .. _sphx_glr_download_recipes_line_chart_plot_line_format_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_line_format_chart.ipynb ` .. container:: sphx-glr-download sphx-glr-download-python :download:`Download Python source code: plot_line_format_chart.py ` .. container:: sphx-glr-download sphx-glr-download-zip :download:`Download zipped: plot_line_format_chart.zip ` .. only:: html .. rst-class:: sphx-glr-signature `Gallery generated by Sphinx-Gallery `_