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

.. only:: html

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

        Click :ref:`here <sphx_glr_download_gallery_plotting_plot_colorbars.py>`
        to download the full example code

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

.. _sphx_glr_gallery_plotting_plot_colorbars.py:


Line plot and colorbar
======================

.. GENERATED FROM PYTHON SOURCE LINES 10-21



.. image-sg:: /gallery/plotting/images/sphx_glr_plot_colorbars_001.png
   :alt: plot colorbars
   :srcset: /gallery/plotting/images/sphx_glr_plot_colorbars_001.png
   :class: sphx-glr-single-img





.. code-block:: default

    import vispy.plot as vp

    fig = vp.Fig(size=(600, 500), show=False)
    plotwidget = fig[0, 0]

    fig.title = "bollu"
    plotwidget.plot([(x, x**2) for x in range(0, 100)], title="y = x^2")
    plotwidget.colorbar(position="top", cmap="autumn")

    if __name__ == '__main__':
        fig.show(run=True)


.. rst-class:: sphx-glr-timing

   **Total running time of the script:** ( 0 minutes  3.783 seconds)


.. _sphx_glr_download_gallery_plotting_plot_colorbars.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_colorbars.py <plot_colorbars.py>`



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

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


.. only:: html

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

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