Gnuplot 1
Материал из noname.com.ua
Перейти к навигацииПерейти к поискуеще один пример GnuPlot
Простой пример - надо по данным построить графики ...
Есть файлы с данными вида:
1 23.580395937 23.5267081261 23.7749998569 23.5701329708 24.0292799473 23.69630336762000000000 2 25.8954720497 26.6318509579 25.9335510731 26.3971829414 26.8786141872 26.34733424186000000000 3 28.4024140835 29.3046960831 28.6430590153 30.3671498299 30.4072239399 29.42490859034000000000 4 29.6482050419 30.7001540661 30.2892179489 31.944008112 32.5541381836 31.02714467050000000000 5 32.7724759579 33.5948710442 33.1812839508 33.3737170696 33.7417361736 33.33281683922000000000 6 35.2669630051 35.8299081326 34.1372680664 36.4799239635 36.6365590096 35.67012443544000000000 7 39.7271168232 36.4666860104 37.1819970608 37.2456641197 35.9785430431 37.32000141144000000000 8 39.3798501492 37.8979799747 36.6972279549 39.0378718376 38.0835850239 38.21930298806000000000 9 39.3676221371 40.3348779678 41.0830049515 35.4723720551 37.4217040539 38.73591623308000000000 10 40.385436058 39.9037630558 40.4375531673 38.5978329182 43.854006052 40.63571825026000000000 11 46.525799036 45.1783440113 39.1234190464 41.739030838 42.271780014 42.96767458914000000000 12 48.5315790176 40.5370929241 40.1330919266 45.8044569492 41.1886651516 43.23897719382000000000 13 45.8602070808 47.4858701229 50.0073029995 48.125797987 48.3769779205 47.97123122214000000000 14 52.1540699005 53.0161960125 52.744353056 48.8072171211 49.311478138 51.20666284562000000000
Всего таких файлов 8 - по 2 на сервер для которого проводилось тестирование. Скрипт - что то вроде такого: =)
#!/usr/bin/gnuplot -persist #set terminal png set terminal png size 1600,800 set output "figure2.png" set xlabel "CPU used" set ylabel "Time, seconds" set grid set xrange [1:32] plot \ "11_data" using 1:7 with linespoints lt rgb "green" lw 2 title "Time-AVG SERVER 1 (n!, n=50000)", \ "21_data" using 1:7 with linespoints lt rgb "orange" lw 2 title "Time-AVG SERVER 2 (n!, n=50000)", \ "31_data" using 1:7 with linespoints lt rgb "black" lw 2 title "Time-AVG SERVER 3 (n!, n=50000)", \ "41_data" using 1:7 with linespoints lt rgb "blue" lw 2 title "Time-AVG SERVER 4 (n!, n=50000)", \ "1_data" using 1:7 with linespoints lt rgb "green" lw 2 title "Time-AVG SERVER 1 (n!, n=100000)", \ "2_data" using 1:7 with linespoints lt rgb "orange" lw 2 title "Time-AVG SERVER 2 (n!, n=100000)", \ "3_data" using 1:7 with linespoints lt rgb "black" lw 2 title "Time-AVG SERVER 3 (n!, n=100000)", \ "4_data" using 1:7 with linespoints lt rgb "blue" lw 2 title "Time-AVG SERVER 4 (n!, n=100000)"