.. DO NOT EDIT. .. THIS FILE WAS AUTOMATICALLY GENERATED BY SPHINX-GALLERY. .. TO MAKE CHANGES, EDIT THE SOURCE PYTHON FILE: .. "gallery/scene/grid_layout/grid_uneven_col.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_gallery_scene_grid_layout_grid_uneven_col.py: Another Grid Layout =================== +-----+-----+-----+ | 1 | 2 | 2 | +-----+-----+-----+ | 3 | 3 | 4 | +-----+-----+-----+ .. GENERATED FROM PYTHON SOURCE LINES 17-43 .. image-sg:: /gallery/scene/grid_layout/images/sphx_glr_grid_uneven_col_001.png :alt: grid uneven col :srcset: /gallery/scene/grid_layout/images/sphx_glr_grid_uneven_col_001.png :class: sphx-glr-single-img .. code-block:: Python import sys from vispy import scene, app canvas = scene.SceneCanvas(keys='interactive') canvas.size = 600, 600 canvas.show() grid = canvas.central_widget.add_grid() # top_left grid.add_widget(row=0, col=0, bgcolor="#999999") # top_right grid.add_widget(row=0, col=1, col_span=2, bgcolor="#dd0000") # bottom_left grid.add_widget(row=1, col=0, col_span=2, bgcolor="#0000dd") # bottom_right grid.add_widget(row=1, col=2, bgcolor="#00dd00") if __name__ == '__main__' and sys.flags.interactive == 0: app.run() .. rst-class:: sphx-glr-timing **Total running time of the script:** (0 minutes 0.466 seconds) .. _sphx_glr_download_gallery_scene_grid_layout_grid_uneven_col.py: .. only:: html .. container:: sphx-glr-footer sphx-glr-footer-example .. container:: sphx-glr-download sphx-glr-download-jupyter :download:`Download Jupyter notebook: grid_uneven_col.ipynb ` .. container:: sphx-glr-download sphx-glr-download-python :download:`Download Python source code: grid_uneven_col.py ` .. only:: html .. rst-class:: sphx-glr-signature `Gallery generated by Sphinx-Gallery `_