sfgrey is the most widely used program in Madagascar. It is used for plotting multidimensional images with grayscale or pseudocolor.

sfgrey shares many of its options with other plotting programs, such as sfgraph, sfwiggle, and sfcontour. You can look for common options by running sfdoc stdplot or checking out stdplot documentation online.

Parameters that control the range of data to be displayed are clip=, pclip=, bias=, allpos=, mean=. The default behavior is pclip=99, which means that data values get clipped to the 99-nth percentile. To display values without clipping, use pclip=100. Setting the clip value with clip= takes the precedence over setting the percentage clip with pclip=. The bias= defines the data value for the middle of the color scale range, the default (appropriate for seismic data) is bias=0. When displaying values that are all larger than the bias value, set allpos=y (all positive). To set the bias to the mean value of the data without specifying it explicitly, use mean=y. The following example from trip/asg/project uses mean=y to display a synthetic model.

The gpow= parameter applies a nonlinear scaling by taking the image to the corresponding power. If the value of gpow is less than zero, the appropriate value is estimated from the data. The following example from gee/pch/ida uses the value of gpow=0.25.

If the input is a 3-D cube, sfgrey can use a particular panel (2-D slice) to estimate clip or glow. The panel is specified by gainpanel= and set by default to the first non-zero panel. To estimate clip using the whole cube, specify gainpanel=all. To clip each panel individually, use gainpanel=each. To add a scale bar, specify scalebar=y. By default, the scale bar is vertical. You can make it horizontal by using bartype=h. To set the minimum and maximum values on the scalebar, use minval= and maxval=. To make the scale bar run in reverse, use barreverse=y. The following example from tccs/optapert/sigsbee uses bartype=h minval=0 maxval=1.

By default, sfgrey displays the first axis running vertical from top to bottom, which corresponds to transp=y yreverse=y and is a common way to display seismic data. For other kinds of data, you can modify the default behavior by setting transp=, xreverse=, and yreverse=. The following example from geo391/hw5/pocs displays a seismic horizon using transp=y yreverse=n.

For an explanation of different color schemes (specified with color= parameter), please refer to previous posts:

10 previous programs of the month: