int DrawGraph(int sock, int GXSIZE, int GYSIZE, int ming, int
             maxg, int mint, int maxt)
{
  int xw,yh,mark_inc,semi_inc,start_pos;
  char buffer[20];
  int i;

  transmap yaxis(ming,maxg,GYSIZE,0); /* Initialize drawing system */
  transmap xaxis(mint,maxt,0,GXSIZE);
  DrawImageObject di(GXSIZE ,GYSIZE,256);  
  /* Draw box around whole image */
  di.SetColor(0,255,255,255);
  di.SetColor(1,255,0,0);
  di.SetColor(2,0,255,0);
  di.SetColor(3,0,0,255);
  di.SetColor(4,0,0,0);
  di.SetColor(5,192,192,192);
}
Listing 10This code sets up the graphic response object, sets some default colors, and draws an outside border in preparation for drawing the actual graph data.