Gnuplot - Open source graphing tool for plotting graphs and histograms

Опубликовано: 27 Апрель 2020
на канале: Technosilent
1,328
26

#Technosilent
#Gnuplot- Open source graphing tool

OS: ubuntu 16.04 LTS
#GNUPLOT version 5.0
#Gnuplot - Open source graphing tool for plotting graphs and histograms #Technosilent
//Step 1: Installation

sudo apt-get install gnuplot

//Step 2: Need two files

1. data.txt
2. gnucode.plt

//step 3:Create data.txt file

//data for 2D graphs

Distance AODVLoss DSRLoss
15.6595 70.5795 102.25
158.172 90.6665 125.36
282.264 95.697 125.39
315.932 96.6758 158.69
323.28 96.8755 168.58
358.363 97.7704 175.98
405.504 98.8438 182.69
629.357 102.662 158.63
773.026 104.448 198.23
822.708 104.989 201.25
854.187 105.315 205.83

//data for histogram

Distance 100 102
Loss 98 65
Receivedpower 78 72
Throughput 87.75 57
Delay 58 29
Jitter 42 28
Energy 23 30


//Step 4: write progrm for gnucode.plt


//2D graph gnucode

set terminal pdf
set output "friis.pdf"
set multiplot
set xlabel "Distance (m)"
set ylabel "Loss (dB)"
set grid
plot "friis.txt" using 1:2 with linespoints title "AODV" linestyle 1 lw 2 lc rgb 'red',"friis.txt" using 1:3 with linespoints title "DSR" linestyle 2 lw 2 lc rgb 'green'
unset multiplot


// histogram gnucode

set terminal pdf
set output "performance.pdf"
set title "performance of protocols"
set style data histogram
set style fill solid
set xtic rotate out
set style histogram clustered
plot "manet.txt" using 2:xtic(1) title "AODV" lc rgb 'red', "manet.txt" using 3:xtic(1) title "DSR" lc rgb 'blue'


//step 5: plot the graph using the command

$ gnuplot 2dgraph.plt


Thank you for watching ... kindly subscribe my channel #Technosilent


На этой странице сайта вы можете посмотреть видео онлайн Gnuplot - Open source graphing tool for plotting graphs and histograms длительностью часов минут секунд в хорошем качестве, которое загрузил пользователь Technosilent 27 Апрель 2020, поделитесь ссылкой с друзьями и знакомыми, на youtube это видео уже посмотрели 1,328 раз и оно понравилось 26 зрителям. Приятного просмотра!