|
A Discrete-Event Network Simulator
|
API
|
Go to the documentation of this file.
24 #ifndef GNUPLOT_AGGREGATOR_H
25 #define GNUPLOT_AGGREGATOR_H
29 #include "ns3/gnuplot.h"
30 #include "ns3/data-collection-object.h"
84 void Write2d (std::string context,
double x,
double y);
147 void SetTitle (
const std::string &title);
153 void SetLegend (
const std::string &xLegend,
const std::string &yLegend);
158 void SetExtra (
const std::string &extra);
179 void Add2dDataset (
const std::string &dataset,
const std::string &title);
301 #endif // GNUPLOT_AGGREGATOR_H
a unique identifier for an interface.
void SetTitle(const std::string &title)
static void Set2dDatasetDefaultExtra(const std::string &extra)
Change extra formatting style parameters for newly created objects.
bool m_xAndYLegendsSet
Set equal to true after setting the x and y legends.
void Set2dDatasetErrorBars(const std::string &dataset, enum Gnuplot2dDataset::ErrorBars errorBars)
Set the error bars to use for this dataset.
Every class exported by the ns3 library is enclosed in the ns3 namespace.
static void Set2dDatasetDefaultStyle(enum Gnuplot2dDataset::Style style)
Change default style for all newly created objects.
void Add2dDataset(const std::string &dataset, const std::string &title)
Adds a 2D dataset to the plot.
a simple class to generate gnuplot-ready plotting commands from a set of datasets.
void Write2dDatasetEmptyLine(const std::string &dataset)
Add an empty line in the data output sequence.
Gnuplot m_gnuplot
Used to create gnuplot files.
void SetTerminal(const std::string &terminal)
void Write2dWithXErrorDelta(std::string context, double x, double y, double errorDelta)
Writes a 2D value to a 2D gnuplot dataset with error bars in the x direction.
Base class for data collection framework objects.
static void Set2dDatasetDefaultErrorBars(enum Gnuplot2dDataset::ErrorBars errorBars)
Change default errorbars style for all newly created objects.
void SetLegend(const std::string &xLegend, const std::string &yLegend)
std::string m_extra
The extra gnuplot command that will be added to the gnuplot control statements.
void Set2dDatasetStyle(const std::string &dataset, enum Gnuplot2dDataset::Style style)
Set the style of plotting to use for this dataset.
void Write2d(std::string context, double x, double y)
Writes a 2D value to a 2D gnuplot dataset.
void SetExtra(const std::string &extra)
void AppendExtra(const std::string &extra)
std::string m_title
The title.
std::string m_graphicsFileName
The graphics file name with its extension.
GnuplotAggregator(const std::string &outputFileNameWithoutExtension)
bool m_titleSet
Set equal to true after setting the title.
std::string m_terminal
The terminal.
std::string m_yLegend
The y legend.
void Write2dWithXYErrorDelta(std::string context, double x, double y, double xErrorDelta, double yErrorDelta)
Writes a 2D value to a 2D gnuplot dataset with error bars in the x and y directions.
virtual ~GnuplotAggregator()
static TypeId GetTypeId()
Get the type ID.
std::map< std::string, Gnuplot2dDataset > m_2dDatasetMap
Maps context strings to 2D datasets.
void Write2dWithYErrorDelta(std::string context, double x, double y, double errorDelta)
Writes a 2D value to a 2D gnuplot dataset with error bars in the y direction.
This aggregator produces output used to make gnuplot plots.
ErrorBars
Whether errorbars should be used for this dataset.
void SetKeyLocation(enum KeyLocation keyLocation)
Set the location of the key in the plot.
KeyLocation
The location of the key in the plot.
std::string m_outputFileNameWithoutExtension
The output file name without any extension.
Style
The plotting style to use for this dataset.
void Set2dDatasetExtra(const std::string &dataset, const std::string &extra)
Add extra formatting parameters to this dataset.
std::string m_xLegend
The x legend.