View Raw SPL
/* set stripchart attributes */
setstripchartattrib(dir, gap, alt, cmode, xgrid, ygrid, color, plot, win)
{
        if (argc < 9)
        {
                win = refwin(w0);

                if (argc < 8)
                {
                        plot = 1;

                        if (argc < 7)
                        {
                                if (argc < 6)
                                {
                                        if (argc < 5)
                                        {
                                                if (argc < 4)
                                                {
                                                        if (argc < 3)
                                                        {
                                                                if (argc < 2)
                                                                {
                                                                        if (argc < 1) dir = getstripchartdir(win);
                                                                        
                                                                        gap = getstripchartgap(win);
                                                                }
                                                                
                                                                alt = getstripchartalt(win);
                                                        }
                                                        
                                                        cmode = getstripchartcolormode(win);
                                                }
                                                
                                                xgrid = getgridstyle(1);
                                        }
                                        
                                        ygrid = getgridstyle(2);
                                }
                                
                                color = getwcolor(win, 1);
                        }
                }
        }

        if (dir >= 0)        setstripchartdir(win, dir, plot);
        if (gap >= 0)   setstripchartgap(win, gap, plot);
        if (alt >= 0)   setstripchartalt(win, alt, plot);
        if (cmode >= 0) setstripchartcolormode(win, cmode, plot);

        if (xgrid >= 0) setstripchart_gridstyle(win, 1, xgrid, plot);
        if (ygrid >= 0) setstripchart_gridstyle(win, 2, ygrid, plot);

        if (cmode == 2 && color != -1)
        {
                wincolor(win, -1, color, 0);
        }
}


setstripchart_gridstyle(win, type, style, plot)
{
        local i, n, f;

        /* current focus */
        f = getfocus(win);

        /* num overlays */
        n = getfocus(win, -1);

        /* set style for all overlays */
        loop (i = 1..n)
        {
                focus(win, i);
                setgridstyle(win, type, style, plot);
        }
        
        focus(win, f);
}