68 void SetTitle (
const std::string& title);
80 void SetExtra (
const std::string& extra);
186 void Add (
double x,
double y);
195 void Add (
double x,
double y,
double errorDelta);
205 void Add (
double x,
double y,
double xErrorDelta,
double yErrorDelta);
254 Gnuplot2dFunction (
const std::string& title =
"Untitled",
const std::string&
function =
"");
293 void SetStyle (
const std::string& style);
302 void Add (
double x,
double y,
double z);
350 Gnuplot3dFunction (
const std::string& title =
"Untitled",
const std::string&
function =
"");
381 Gnuplot (
const std::string& outputFilename=
"",
const std::string& title =
"");
407 void SetTitle (
const std::string& title);
413 void SetLegend (
const std::string& xLegend,
const std::string& yLegend);
418 void SetExtra (
const std::string& extra);
453 std::ostream &osData,
454 std::string dataFileName);
532 std::ostream &osData,
533 std::string dataFileName);
Class to represent a 2D points plot.
void AddEmptyLine()
Add an empty line in the data output sequence.
std::vector< struct Point > PointSet
The set of points in the dataset.
void SetErrorBars(enum ErrorBars errorBars)
ErrorBars
Whether errorbars should be used for this dataset.
static enum Style m_defaultStyle
default plot style
void SetStyle(enum Style style)
static void SetDefaultStyle(enum Style style)
Change default style for all newly created objects.
void Add(double x, double y)
Style
The plotting style to use for this dataset.
static void SetDefaultErrorBars(enum ErrorBars errorBars)
Change default errorbars style for all newly created objects.
static enum ErrorBars m_defaultErrorBars
default error bars type
Gnuplot2dDataset(const std::string &title="Untitled")
Class to represent a 2D function expression plot.
void SetFunction(const std::string &function)
Gnuplot2dFunction(const std::string &title="Untitled", const std::string &function="")
Class to represent a 3D points plot.
void AddEmptyLine()
Add an empty line in the data output sequence.
Gnuplot3dDataset(const std::string &title="Untitled")
static std::string m_defaultStyle
default plot style
std::vector< struct Point > PointSet
The set of points in the dataset.
void Add(double x, double y, double z)
static void SetDefaultStyle(const std::string &style)
Change default style for all newly created objects.
void SetStyle(const std::string &style)
Class to represent a 3D function expression plot.
Gnuplot3dFunction(const std::string &title="Untitled", const std::string &function="")
void SetFunction(const std::string &function)
a simple class to group together multiple gnuplots into one file, e.g.
std::string m_outputFilename
Output file name.
GnuplotCollection(const std::string &outputFilename)
void AddPlot(const Gnuplot &plot)
void SetTerminal(const std::string &terminal)
Gnuplot & GetPlot(unsigned int id)
Return a pointer to one of the added plots.
std::string m_terminal
Gnuplot "terminal" to use.
Plots m_plots
Plots in the collection.
void GenerateOutput(std::ostream &os)
std::vector< Gnuplot > Plots
Type of the Gnuplot collection.
Abstract class to store a plot line to be used by ns3::Gnuplot.
GnuplotDataset(const GnuplotDataset &original)
Reference-counting copy constructor.
static void SetDefaultExtra(const std::string &extra)
Change extra formatting style parameters for newly created objects.
GnuplotDataset & operator=(const GnuplotDataset &original)
Reference-counting assignment operator.
struct Data * m_data
Reference counted data object.
void SetExtra(const std::string &extra)
Add extra formatting parameters to this dataset.
static std::string m_defaultExtra
Extra gnuplot parameters set on every newly created dataset.
void SetTitle(const std::string &title)
Change line title.
~GnuplotDataset()
Reference-counting destructor.
a simple class to generate gnuplot-ready plotting commands from a set of datasets.
std::string m_yLegend
Y axis legend.
void AddDataset(const GnuplotDataset &dataset)
void SetLegend(const std::string &xLegend, const std::string &yLegend)
void SetTerminal(const std::string &terminal)
std::string m_terminal
Gnuplot "terminal" to use.
std::string m_extra
extra parameters for the plot
unsigned int m_dataFileDatasetIndex
Data set index to plot.
void AppendExtra(const std::string &extra)
Datasets m_datasets
Data sets.
void GenerateOutput(std::ostream &os)
Writes gnuplot commands and data values to a single output stream.
std::string m_title
Plot title.
std::vector< GnuplotDataset > Datasets
Type for Datasets to be used in plots.
void SetDataFileDatasetIndex(unsigned int index)
Sets the current data stream index in the data file.
std::string m_xLegend
X axis legend.
std::string m_outputFilename
Output file name.
Gnuplot(const std::string &outputFilename="", const std::string &title="")
void SetExtra(const std::string &extra)
void SetTitle(const std::string &title)
void SetOutputFilename(const std::string &outputFilename)
bool m_generateOneOutputFile
true if only one plot will be generated
static std::string DetectTerminal(const std::string &filename)
Crude attempt to auto-detect the correct terminal setting by inspecting the filename's extension.
Every class exported by the ns3 library is enclosed in the ns3 namespace.
Structure storing the data to for a 2D plot.
bool empty
the point is empty
Structure storing the function to be used for a 2D plot.
Structure storing the data for a 3D plot.
bool empty
the point is empty
Structure storing the function to be used for a 3D plot.
Structure storing the data to plot.