6.1.4 Graphic View Graphic View
Figure 21: graphic view (initial state) Figure 21: graphic view (initial state) This last area shows
This last area shows the graphic plotted with set of configurations chosenonthe graphic plotted with set of configurations chosenon interface. Tomake the graphic for the first time, click
interface. Tomake the graphic for the first time, click on “Make a on “Make a view”.view”.
IMPORTANT:
IMPORTANT: Make sure that you have Make sure that you have gnuplot installed on your computer, withgnuplot installed on your computer, with support for jpg, png or
support for jpg, png or gif terminal. If nothing of these gif terminal. If nothing of these terminals are installed, this featureterminals are installed, this feature will not work, showing an error
will not work, showing an error image – see figure 22.image – see figure 22.
Other problems can show the figure 22on visualization area, besides the listed Other problems can show the figure 22on visualization area, besides the listed problems on the figure, as well as if you try to make a view for histogram without insert problems on the figure, as well as if you try to make a view for histogram without insert any interval.
any interval.
Figure 22 Figure 22 After
After to to begetbeget the
the refrerefresh bush button tton to gto generaeneratt
F Fiigguurr
: Error image displayed if
: Error image displayed if some error occsome error occ fi
firrsst vt viieeww, y, yoou cu caan un uppddaatte ae anny cy coonnffiigguurr a new gr
a new graphic. See figure 23.aphic. See figure 23.
e 23: A view of line graphic (using smoot e 23: A view of line graphic (using smoot
rred.
rred.
ation and click on ation and click on
h) h)
If you pass the this is because gnuplot try to this is because gnuplot try to think thatyou graphic is not think thatyou graphic is not The view area will be The view area will be
6.2
6.2 Saving your s Saving your s
A
Afftteer r cchhoooosse e tthhe e nneeccee
“Generate GNU-Plot Script”.
“Generate GNU-Plot Script”.
aaccccoorrddiinngglly y wwiitth h ttrraacce e ffiillee, , ss script, another file is created script, another file is created
OBS:
OBS: If you chooseIf you choose wi
with th alall nl nececesessasary ry jajava va scscriripp sshhoow w tthhe e wweeb b ppaagge e aaccccoorrddiinn output files, saving space in output files, saving space in
mou
mouse ase abovbove the the ime image age arearea, ta, the che cursursor wor w
wi
windndow ow wiwill ll be be didispsplalayeyed wd witith a h a lalargrge ve vii times the large view is a
times the large view is a little different oflittle different of accommodate the graphic as the best way accommodate the graphic as the best way
ood, try to view a
ood, try to view a large picture first.large picture first.
resized according to the resizing of the resized according to the resizing of the wiwi
cript
ream and metric to generate the graphic;ream and metric to generate the graphic;
ith same name, but with the extension “.
ith same name, but with the extension “.
TML
TML 5 5 as as outoutputput, , an an addadditiitionaonal l dirdirectectoo s,
s, imimagages es anand cd casascacadiding ng ststylyle se sheheet et (c(css ss ff gly. This directory can be used for many gly. This directory can be used for many
isk and leaving
isk and leaving organized your directory.organized your directory.
ll turn in a
6.3
6.3 Loading your script on gnuplot Loading your script on gnuplot
Inside of script, you will find the necessary instruction for load the script on gnuplot. See Inside of script, you will find the necessary instruction for load the script on gnuplot. See some ways to make this:
some ways to make this:
1.
1. Open gnuplot by line command on Open gnuplot by line command on the same directorythe same directory of script;
of script;
type
typeload load “name_of_script.tx“name_of_script.txt”.t”.
2.
2. Open gnuplot in any directory;Open gnuplot in any directory;
type
typecd cd “complete_path_to_script_direc“complete_path_to_script_directory”tory”;;
make the step 1.
make the step 1.
3.
3. In a line command terminal, you can typeIn a line command terminal, you can type gnuplot gnuplot
“name_of_script.txt”
“name_of_script.txt” to open gnuplot and auto load the to open gnuplot and auto load the script, but attention: if the output was configured not script, but attention: if the output was configured not generate a file, the gnuplot will be immediately closed, generate a file, the gnuplot will be immediately closed, otherwise, the file defined on script will be saved on the otherwise, the file defined on script will be saved on the same
same directory.directory.
4.
4. If you are using a If you are using a graphic interface, you can load the filegraphic interface, you can load the file by menu.
by menu.
6.4
6.4 Knowing the script Knowing the script
A typical script for lines plot A typical script for lines plot The script tries to
The script tries to be the most minimalist possible, to ensure the be the most minimalist possible, to ensure the compatibilcompatibility withity with old versions of gnuplot. When defaults values are selected on interface, they are not old versions of gnuplot. When defaults values are selected on interface, they are not written on file.
written on file.
IMPORTANT:
IMPORTANT:
The script is based on the newest 4.6 version of gnuplot to date. The script is based on the newest 4.6 version of gnuplot to date.
Each line started by ‘#’ is a commentedline; it makes no difference for gnuplot Each line started by ‘#’ is a commentedline; it makes no difference for gnuplot First line after commented li
First line after commented lines returns gnuplot environment to default values.nes returns gnuplot environment to default values.
Second line define a local variable e (sometimes does not exist by default);
Second line define a local variable e (sometimes does not exist by default);
Third line set the ‘NaN’ as data file missing value, if encountered on data file .dat Third line set the ‘NaN’ as data file missing value, if encountered on data file .dat
#Instruction: to plot the graphic, type load "
#Instruction: to plot the graphic, type load " Stream 3_(tcp-star-server)_Delay.txt" in the same directory.Stream 3_(tcp-star-server)_Delay.txt" in the same directory.
#You can type 'cd "C:\Users\Reuel\Desktop"' on GNU-plot to reach it.
#You can type 'cd "C:\Users\Reuel\Desktop"' on GNU-plot to reach it.
#Make sure that the file "Stream 3_(tcp-star-server)_Delay.dat" is in the same directory.
#Make sure that the file "Stream 3_(tcp-star-server)_Delay.dat" is in the same directory.
#This part configures the GNUplot environment to
#This part configures the GNUplot environment to be adjusted conform your configuration.be adjusted conform your configuration.
#Feel free to alter it.
#Feel free to alter it.
#
#As there may be incompatibilitiesAs there may be incompatibilities with older versions of the with older versions of the script GNUPlot,script GNUPlot,
#which might not accept some of
#which might not accept some of the explicitsettings, just comment out the line by the explicitsettings, just comment out the line by placing a # at placing a # at the beginning.the beginning.
reset;
set title title "Stream "Stream 3";3";
set xlabel "Elapsed time (Seconds)";
set xlabel "Elapsed time (Seconds)";
set ylabel "Delay variation";
set ylabel "Delay variation";
#The inline command to be used on GNUPlot.
#The inline command to be used on GNUPlot.
plot "Stream 3_(tcp-star-server)_Delay.dat" every 1:1:0:0:5410:0 using 1:2 title "Delay
plot "Stream 3_(tcp-star-server)_Delay.dat" every 1:1:0:0:5410:0 using 1:2 title "Delay of stream 3" with pointsof stream 3" with points
Fourth and fifth line defines the
Fourth and fifth line defines the terminal and the output.terminal and the output.
The next three lines are intuitive, and the last command is not explained here.
The next three lines are intuitive, and the last command is not explained here.
A typical script for histogram plot A typical script for histogram plot Note:
Note: The two scripts are very sThe two scripts are very similar!imilar!
This script contain additional lines such This script contain additional lines such
set key outside box ; set key outside box ; set style data histogram;
set style data histogram;
set style histogram clustered gap 2.0;
set style histogram clustered gap 2.0;
set style fill pattern 1 border lt -1;
set style fill pattern 1 border lt -1;
Those lines configure only some styles
Those lines configure only some styles on gnuplot to work properly.on gnuplot to work properly.
#Instruction: to plot the graphic, type load "Stream
#Instruction: to plot the graphic, type load "Stream 3_(tcp-star-server)_Delay.txt" in the same directory.3_(tcp-star-server)_Delay.txt" in the same directory.
#You can type 'cd "C:\Users\Reuel\Desktop"' on GNU-plot to reach it.
#You can type 'cd "C:\Users\Reuel\Desktop"' on GNU-plot to reach it.
#Make sure that the file "Stream 3_(tcp-star-server)_Delay.dat" is in the same directory.
#Make sure that the file "Stream 3_(tcp-star-server)_Delay.dat" is in the same directory.
#This part configures the GNUplot environment to
#This part configures the GNUplot environment to be adjusted conform your configuration.be adjusted conform your configuration.
#Feel free to alter it.
#Feel free to alter it.
#
#As there may be incompatibilitiesAs there may be incompatibilities with older versions of the script GNUPlot,with older versions of the script GNUPlot,
#which might not accept some of the explicit settings, just comment out the line by placing a # at the beginning.
#which might not accept some of the explicit settings, just comment out the line by placing a # at the beginning.
reset;
set style histogram clustered gap 2.0;
set style histogram clustered gap 2.0;
set style fill pattern 1 border lt -1;
set style fill pattern 1 border lt -1;
set
set title title "Stream "Stream 3";3";
set xlabel "Selected stream";
set xlabel "Selected stream";
set ylabel "Percents of use for each i
set ylabel "Percents of use for each interval (%)";nterval (%)";
#The inline command to be used on GNUPlot.
#The inline command to be used on GNUPlot.
plot "Stream
plot "Stream 3_(tcp-star-server)_IPDV.dat" using 3_(tcp-star-server)_IPDV.dat" using 2 title "[0.0 : 2 title "[0.0 : 0.003]", 0.003]", "" using 3 t"" using 3 title "[0.003 : 0.006]", itle "[0.003 : 0.006]", "" using"" using 4:xtic(1) title "Remainder"
4:xtic(1) title "Remainder"
Again, the last command isn’t explained here.
Again, the last command isn’t explained here.
For more information about other commands and flags of gnuplot, you can find For more information about other commands and flags of gnuplot, you can find all necessary support on
all necessary support on http://gnuplot.sourceforge.net/http://gnuplot.sourceforge.net/..