View Raw SPL
/*****************************************************************************
*                                                                            *
*   SETHVGRID.SPL Copyright (C) 2010 DSP Development Corporation             *
*                               All Rights Reserved                          *
*                                                                            *
*   Author:       Randy Race                                                 *
*                                                                            *
*   Synopsis:     Sets the horizontal and vertical grid style and color      *
*                                                                            *
*   Revisions:     7 Sep 2010  RRR  Creation                                 *
*                                                                            *
*****************************************************************************/


#if @HELP_SETHVGRID

    SETHVGRID

    Purpose: Sets the style and color of the horizontal and vertical grids

    Syntax:  SETHVGRID(win, style color)

              win - Optional. The target window. Defaults to the current
                    window.

             style - An integer, the grid style:
                        0: Off
                        1: Solid
                        2: Dashed
                        3: Dotted

             color - Optional. An integer, the grid color. Defaults to
                     the current grid color.

    Returns: Nothing, the horizontal and vertical grids are set.

    Example:
             W1: gnorm(100, 1);sethvgrid(1);

             Sets the grids in W1 to solid in the current grid color.

    Example:
             W1: gnorm(100, 1);sethvgrid(3, black);

             Sets the grids in W1 to dotted in black.

    Remarks:
             SETHVGRID sets both the horizontal and vertical grids.

             Use SETHVGRID(0) to turn off grids.

             See GETHVGRID to return the grid style and color.

    See Also:
             Griddash
             Griddot
             Gridhv
             Gridsol
             Sethgrid
             Setvgrid
#endif


/* sets horizontal (y) and vertical (x) grids */
sethvgrid(w, style, color)
{
        setvgrid(w, style, color);
        sethgrid(w, style, color);
}