Advertisement
Guest User

Untitled

a guest
Apr 20th, 2018
158
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1.     ofstream fplot;
  2.     fplot.open("Comparacion.plt", ios::trunc);
  3.     fplot << "set title " << "\"" << "Compracion " << nombre1 << " vs. " << nombre2 << "\"" << endl;
  4.     fplot << "set key top left vertical inside\n";
  5.     fplot << "set grid\n";
  6.     fplot << "set xlabel \"Talla (n)\" \n";
  7.     fplot << "set ylabel \"Tiempo (ms)\" \n";
  8.     fplot << "plot \"" "Comparacion.txt\" using 1:2 with lines title \"" << nombre1 << "\" , \"" << "Comparcion.txt\" using 1:3 with lines title \"" << nombre2 << "\"\n";
  9.     fplot << "set terminal pdf\n";
  10.     fplot << "set output \"comparacion.png\" \n";
  11.     fplot << "replot\n";
  12.     fplot << "pause 5 'Pulsa Enter para continuar...' \n";
  13.     fplot.close();
  14.     cout << "Grafica guardada en el fichero Comparacion.png" << endl;
  15.    
  16.     system("Comparacion.plt");
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement