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

.. only:: html

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

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

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

.. _sphx_glr_gallery_scene_background_borders.py:


Demonstration of borders and background colors
==============================================

.. GENERATED FROM PYTHON SOURCE LINES 11-24



.. image-sg:: /gallery/scene/images/sphx_glr_background_borders_001.png
   :alt: background borders
   :srcset: /gallery/scene/images/sphx_glr_background_borders_001.png
   :class: sphx-glr-single-img





.. code-block:: default


    from vispy.scene import SceneCanvas

    canvas = SceneCanvas(keys='interactive', bgcolor='w', show=True)
    grid = canvas.central_widget.add_grid(spacing=0, bgcolor='gray',
                                          border_color='k')
    view1 = grid.add_view(row=0, col=0, margin=10, bgcolor=(1, 0, 0, 0.5),
                          border_color=(1, 0, 0))
    view2 = grid.add_view(row=0, col=1, margin=10, bgcolor=(0, 1, 0, 0.5),
                          border_color=(0, 1, 0))

    if __name__ == '__main__':
        canvas.app.run()


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

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


.. _sphx_glr_download_gallery_scene_background_borders.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: background_borders.py <background_borders.py>`



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

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


.. only:: html

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

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