

.. _example_structured_grid:

Structured grid example
--------------------------------------------

An example of how to generate a structured grid dataset using
numpy arrays.  Also shown is a way to visualize this data with
the mayavi2 application.

The script can be run like so::

  $ mayavi2 -x structured_grid.py

Alternatively, it can be run as::

  $ python structured_grid.py




**Python source code:** :download:`structured_grid.py`

.. literalinclude:: structured_grid.py
    :lines: 15-


    