Exemplo n.º 1
0
void xvgr_legend(FILE *out,int nsets,char *setname[])
{
  int i;
  
  xvgr_view(out,0.15,0.15,0.75,0.85);
  fprintf(out,"@ legend on\n");
  fprintf(out,"@ legend box on\n");
  fprintf(out,"@ legend loctype view\n");
  fprintf(out,"@ legend %g, %g\n",0.78,0.8);
  fprintf(out,"@ legend length %d\n",2);
  for(i=0; (i<nsets); i++)
    if (setname[i]) {
      if (use_xmgr())
	fprintf(out,"@ legend string %d \"%s\"\n",i,setname[i]);
      else
	fprintf(out,"@ s%d legend \"%s\"\n",i,setname[i]);
    }
}
Exemplo n.º 2
0
FILE *xvgropen(char *fn,char *title,char *xaxis,char *yaxis)
{
  FILE *xvgr;
  time_t t;
  
  xvgr=(FILE *)ffopen(fn,"w");
  fprintf(xvgr,"# This file was created by %s\n",Program());
  fprintf(xvgr,"# which is part of G R O M A C S:\n");
  fprintf(xvgr,"# %s\n",bromacs());
  time(&t);
  fprintf(xvgr,"# All this happened at: %s",ctime(&t));
  fprintf(xvgr,"#\n");
  fprintf(xvgr,"@    title \"%s\"\n",title);
  fprintf(xvgr,"@    xaxis  label \"%s\"\n",xaxis);
  fprintf(xvgr,"@    yaxis  label \"%s\"\n",yaxis);
  if (use_xmgr())
    fprintf(xvgr,"@TYPE nxy\n");
  else
    fprintf(xvgr,"@TYPE xy\n");
  
  return xvgr;
}
Exemplo n.º 3
0
FILE *xvgropen(const char *fn,const char *title,const char *xaxis,const char *yaxis)
{
  FILE *xvgr;
  char pukestr[100];
  time_t t;
  
  xvgr=gmx_fio_fopen(fn,"w");
  if (bPrintXvgrCodes()) {
    time(&t);
    fprintf(xvgr,"# This file was created %s",ctime(&t));
    fprintf(xvgr,"# by the following command:\n# %s\n#\n",command_line());
    fprintf(xvgr,"# %s is part of G R O M A C S:\n#\n",Program());
    bromacs(pukestr,99);
    fprintf(xvgr,"# %s\n#\n",pukestr);
    fprintf(xvgr,"@    title \"%s\"\n",title);
    fprintf(xvgr,"@    xaxis  label \"%s\"\n",xaxis);
    fprintf(xvgr,"@    yaxis  label \"%s\"\n",yaxis);
    if (use_xmgr())
      fprintf(xvgr,"@TYPE nxy\n");
    else
      fprintf(xvgr,"@TYPE xy\n");
  }
  return xvgr;
}