# include "data.h"

int line (int argc, char **argv) {
  
  int kapa;
  Graphdata graphmode;
  float x[2], y[2];

  if (!style_args (&graphmode, &argc, argv, &kapa)) return FALSE;

  if (argc != 6) {
    gprint (GP_ERR, "USAGE: line <x> <y> to <x> <y>\n");
    return (FALSE);
  }
  x[0] = atof(argv[1]);
  y[0] = atof(argv[2]);
  x[1] = atof(argv[4]);
  y[1] = atof(argv[5]);

  /* set point style and errorbar mode (these are NOT sticky) */
  graphmode.style = 0;
  graphmode.etype = 0;

  if (!KapaPrepPlot (kapa, 2, &graphmode)) return (FALSE);
  KapaPlotVector (kapa, 2, x, "x");
  KapaPlotVector (kapa, 2, y, "y");
  
  return (TRUE);
}
