next up previous contents index
Next: Postscript Up: Palette Previous: File   Contents   Index


Gamma correction

For gray mappings gamma correction can be turned on by set palette gamma 5#5gamma6#6. 5#5gamma6#6 defaults to 1.5 which is quite suitable for most terminals.

For color mappings no automatic gamma correction is done by gnuplot. However, you may easily implement gamma correction. Here is an example for a gray scale image by use of explicit functions for the red, green and blue component with slightly different values of gamma

Example:

     set palette model RGB
     set palette functions gray**0.64, gray**0.67, gray**0.70

To use gamma correction with interpolated gradients specify intermediate gray values with appropriate colors. Instead of


     set palette defined ( 0 0 0 0, 1 1 1 1 )

use e.g.


     set palette defined ( 0 0 0 0, 0.5 .73 .73 .73, 1 1 1 1 )

or even more intermediate points until the linear interpolation fits the "gamma corrected" interpolation well enough.



Ethan Merritt 2007-03-03