if u want to invoke the gnuplot with c then your code should be in this pattern.

FILE*gnuplot;
      gnuplot= popen("E:\\gp442win32\\gnuplot\\binary\\gnuplot -persist","w");
      fprintf(gnuplot,"plot 'output.DAT'\n");
      fprintf(gnuplot,"set title 'Po(db) v/s step/(km)'\n");
      fprintf(gnuplot,"set xlabel 'step(km)'\n");
      fprintf(gnuplot,"set ylabel 'Po(db)'\n");
      fflush(gnuplot); 
      close(gnuplot);
Be a part of the DaniWeb community

We're a friendly, industry-focused community of developers, IT pros, digital marketers, and technology enthusiasts meeting, networking, learning, and sharing knowledge.