// Gnuplot parameter
std::string fileNameWithNoExtension = "TimeVsThroughput";
std::string graphicsFileName = fileNameWithNoExtension + ".png";
std::string plotFileName = fileNameWithNoExtension + ".plt";
std::string plotTitle = "Time vs Throughput";
std::string dataTitle = "Throughput";
std::string fileNameWithNoExtension1 = "TimeVsPacketLoss";
std::string graphicsFileName1 = fileNameWithNoExtension1 + ".png";
std::string plotFileName1 = fileNameWithNoExtension1 + ".plt";
std::string plotTitle1 = "Time vs Packet Loss";
std::string dataTitle1 = "Packet Loss";
// Instantiate the plot and set its title.
Gnuplot gnuplot (graphicsFileName);
gnuplot.SetTitle (plotTitle);
gnuplot.SetTerminal ("png"); // Make the .PNG file, which the plot file will be when it is used with Gnuplot
gnuplot.SetLegend ("Time (seconds)", "Throughput (kbps)"); // Set the labels for each axis
Gnuplot2dDataset dataset; // Instantiate the dataset, set its title, and make the points be plotted along with connecting lines.
dataset.SetTitle (dataTitle);
dataset.SetStyle (Gnuplot2dDataset::LINES_POINTS);
Gnuplot gnuplot1 (graphicsFileName1);
gnuplot1.SetTitle (plotTitle1);
gnuplot1.SetTerminal ("png"); // Make the .PNG file, which the plot file will be when it is used with Gnuplot
gnuplot1.SetLegend ("Time (seconds)", "Packet Loss (%)"); // Set the labels for each axis
Gnuplot2dDataset dataset1; // Instantiate the dataset, set its title, and make the points be plotted along with connecting lines.
dataset.SetTitle (dataTitle1);
dataset.SetStyle (Gnuplot2dDataset::LINES_POINTS);