:name: scatter
:description: scatter plot
:ndims: 1
:nvars: 2
:vizshot_method: scatter
:attributes: []
:script: |
  newfrm = opt.delete(:newfrm)
  GGraph::scatter(gphys, gphys1, newfrm, opt)

:ggraph: |
  gropn_1_if_not_yet
  unless defined?(@@scater_options)
    @@scater_options = Misc::KeywordOptAutoHelp.new(
      ['title', nil, 'Title of the figure'],
      ['annotate', true, 'if false, do not put texts on the right margin even when newframe==true'],
      ['index', 1, 'mark index'],
      ['type', 2, 'mark type'],
      ['size', 0.01, 'marks size']
    )
  end
  opts = @@scater_options.interpret(options)
  gphys = gphys.first1D.copy
  gphys1 = gphys1.first1D.copy
  len = gphys.length
  unless len == gphys1.length
    raise ArgumentError, "length of gphys and gphys1 do not agree with each other"
  end
  x = gphys.data
  y = gphys1.data
  if newframe
    fig(x,y)
    axes(x,y)
    title( opts['title'] )
    annotate(gphys.lost_axes) if opts['annotate']
  end
  DCL::uumrkz(x.val, y.val, opts['type'], opts['index'], opts['size'])

