A Discrete-Event Network Simulator
API
Public Member Functions | Public Attributes | List of all members
ns3::Gnuplot2dDataset::Data2d Struct Reference

Structure storing the data to for a 2D plot. More...

+ Inheritance diagram for ns3::Gnuplot2dDataset::Data2d:

Public Member Functions

 Data2d (const std::string &title)
 Initializes with the values from m_defaultStyle and m_defaultErrorBars. More...
 
virtual std::string GetCommand () const
 Returns the plot type ("plot" or "splot"). More...
 
virtual bool IsEmpty () const
 Checks to see if this GnuplotDataset is empty. More...
 
virtual void PrintDataFile (std::ostream &os, bool generateOneOutputFile) const
 Print the inline data file contents trailing the plot command. More...
 
virtual void PrintExpression (std::ostream &os, bool generateOneOutputFile, unsigned int dataFileDatasetIndex, std::string &dataFileName) const
 Prints the plot description used as argument to (s)plot. More...
 
- Public Member Functions inherited from ns3::GnuplotDataset::Data
 Data (const std::string &title)
 Initializes the reference counter to 1 and sets m_title and m_extra. More...
 
virtual ~Data ()
 Required. More...
 

Public Attributes

enum ErrorBars m_errorBars
 Whether errorbars should be used for this dataset. More...
 
PointSet m_pointset
 The set of points in this data set. More...
 
enum Style m_style
 The plotting style to use for this dataset. More...
 
- Public Attributes inherited from ns3::GnuplotDataset::Data
std::string m_extra
 Extra parameters for the plot. More...
 
unsigned int m_references
 ref/unref counter for garbage collection More...
 
std::string m_title
 Dataset title. More...
 

Detailed Description

Structure storing the data to for a 2D plot.

Definition at line 164 of file gnuplot.cc.

Constructor & Destructor Documentation

◆ Data2d()

ns3::Gnuplot2dDataset::Data2d::Data2d ( const std::string &  title)

Initializes with the values from m_defaultStyle and m_defaultErrorBars.

Parameters
titleDataset title

Definition at line 188 of file gnuplot.cc.

Member Function Documentation

◆ GetCommand()

std::string ns3::Gnuplot2dDataset::Data2d::GetCommand ( ) const
virtual

Returns the plot type ("plot" or "splot").

Returns
the plot type ("plot" or "splot").

Implements ns3::GnuplotDataset::Data.

Definition at line 196 of file gnuplot.cc.

◆ IsEmpty()

bool ns3::Gnuplot2dDataset::Data2d::IsEmpty ( ) const
virtual

Checks to see if this GnuplotDataset is empty.

Returns
indicates if this GnuplotDataset is empty.

Implements ns3::GnuplotDataset::Data.

Definition at line 321 of file gnuplot.cc.

◆ PrintDataFile()

void ns3::Gnuplot2dDataset::Data2d::PrintDataFile ( std::ostream &  os,
bool  generateOneOutputFile 
) const
virtual

Print the inline data file contents trailing the plot command.

Empty for functions.

Parameters
osOutput stream
generateOneOutputFileIf true, generate only one output file.

Implements ns3::GnuplotDataset::Data.

Definition at line 281 of file gnuplot.cc.

References ns3::Gnuplot2dDataset::NONE, ns3::Gnuplot2dDataset::X, ns3::Gnuplot2dDataset::XY, and ns3::Gnuplot2dDataset::Y.

◆ PrintExpression()

void ns3::Gnuplot2dDataset::Data2d::PrintExpression ( std::ostream &  os,
bool  generateOneOutputFile,
unsigned int  dataFileDatasetIndex,
std::string &  dataFileName 
) const
virtual

Prints the plot description used as argument to (s)plot.

Either the function expression or a datafile description. Should include m_title and m_extra in the output.

If more than one output file is being generated, i.e. separate data and control files, then the index for the current dataset and the name for the data file are also included.

Parameters
osOutput stream
generateOneOutputFileIf true, generate only one output file.
dataFileDatasetIndexDataset Index
dataFileNameDataset file name

Implements ns3::GnuplotDataset::Data.

Definition at line 202 of file gnuplot.cc.

References ns3::Gnuplot2dDataset::DOTS, ns3::Gnuplot2dDataset::FSTEPS, ns3::Gnuplot2dDataset::HISTEPS, ns3::Gnuplot2dDataset::IMPULSES, ns3::Gnuplot2dDataset::LINES, ns3::Gnuplot2dDataset::LINES_POINTS, ns3::Gnuplot2dDataset::NONE, ns3::Gnuplot2dDataset::POINTS, ns3::Gnuplot2dDataset::STEPS, ns3::Gnuplot2dDataset::X, ns3::Gnuplot2dDataset::XY, and ns3::Gnuplot2dDataset::Y.

Member Data Documentation

◆ m_errorBars

enum ErrorBars ns3::Gnuplot2dDataset::Data2d::m_errorBars

Whether errorbars should be used for this dataset.

Definition at line 169 of file gnuplot.cc.

◆ m_pointset

PointSet ns3::Gnuplot2dDataset::Data2d::m_pointset

The set of points in this data set.

Definition at line 171 of file gnuplot.cc.

◆ m_style

enum Style ns3::Gnuplot2dDataset::Data2d::m_style

The plotting style to use for this dataset.

Definition at line 168 of file gnuplot.cc.


The documentation for this struct was generated from the following file: