pietrod21

creazione ps e png per file

Nov 28th, 2011
118
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
C 0.56 KB | None | 0 0
  1. #include <stdio.h>
  2.  
  3.  
  4.  
  5.  
  6. main(){
  7.  
  8.     FILE *fp;
  9.  
  10.  
  11. fp=fopen("dati_png.gnu","w");
  12. fprintf(fp, " plot 'dteul.dat' u 1:2 \n set xlabel 'gittata massima' \n set ylabel 'dt' \n set term png \n set output 'eull.png' \n replot \n  \n ");
  13. fclose(fp);
  14. system("gnuplot dati_png.gnu");
  15. fp=fopen("dati_ps.gnu","w");
  16. fprintf(fp, " plot 'dteul.dat' u 1:2 \n set xlabel 'gittata massima' \n set ylabel 'dt' \n set term post col \n set output 'eull.ps' \n replot \n  \n ");
  17. fclose(fp);
  18. system("gnuplot dati_ps.gnu");
  19. system("rm dati_ps.gnu");
  20. system("rm dati_png.gnu");
  21.  
  22.  
  23. }
  24.  
  25.  
  26.  
Advertisement
Add Comment
Please, Sign In to add comment