!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
! Test for plot grid
!
! @author  J. Czechowski IV
! @version $Id: test_plot_grid.mm,v 1.1 2008/04/09 16:38:30 jxc Exp $
!
!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
startmacro
  set sr    1e5
  set sfreq sr/10
  set instr "The grid should be showing in the plot, it should not flicker on and off."
  
  pipe init 
    panel/setup/controls=gc

    waveform _wave SF inf white freq=sfreq amp=1e4 delta=1/sr /throttle=real
    fft _wave _waveb nfft=1k navg=1 over=0 /dbf

    ! Setting SCALE=AUTOMIN|AUTOMAX and AUTOL=4 just make Bug 1399 easier to see.
    plot/id=plot1/nice _waveb{cl=8} cnt=motion type=line AXIS=+Grid SCALE=AUTOMIN|AUTOMAX AUTOL=4

    gcontrol label macro  "MACRO"
    gcontrol menu  MAIN   "Exit with Status = " "PASS,FAIL" /tleft
    gcontrol text  idtext "Instructions" "^instr" 12 12 /title
    set gc.MAIN.itemColors {PASS=GREEN,FAIL=RED}
  pipe off
endmacro

procedure processMessage m:msg
  if msg.name EQS "MAIN" then
    assert/text="^reg.main.name: Interactive tests" "PASS" SUBS msg.data
    pipe stop
  else
    say "^reg.main.name: Unhandled message name=^msg.name info=^msg.info data=^msg.data"
  endif
return
