.. _scalar-settings-example:

###################################################
UnstructGrid: Set Scalar Settings on a Loaded Model
###################################################

The scalar result can be configured to make a better visual appearance of your result data, 
for instance settings such as legend scheme, legend range and filtering.

This example will show the scalar as fringes on the model, and set some scalar settings
for demonstration.

-   Set number of legend levels to 5
-   Set color scheme to "Normal Inverted".
-   Filter away all values under 20.

The demo model file (100x100x100.vtf) contains a simple geometry and a scalar result. 

.. image:: ../images/tut_scalarsettings.png
    :height: 300 
    :align: center


.. literalinclude:: ../../../../EnvisionDesktop/Tutorials/ScalarSettings.cpp
    :language: cpp
    :lines: 40-104