ns3::Gnuplot Class Reference

a simple class to generate gnuplot-ready plotting commands from a set of datasets. More...

#include <gnuplot.h>

List of all members.

Public Member Functions

 Gnuplot (const std::string &outputFilename="", const std::string &title="")
void SetTerminal (const std::string &terminal)
void SetTitle (const std::string &title)
void SetLegend (const std::string &xLegend, const std::string &yLegend)
void SetExtra (const std::string &extra)
void AppendExtra (const std::string &extra)
void AddDataset (const GnuplotDataset &dataset)
void GenerateOutput (std::ostream &os) const

Static Public Member Functions

static std::string DetectTerminal (const std::string &filename)

Private Types

typedef std::vector
< GnuplotDataset
Datasets

Private Attributes

std::string m_outputFilename
std::string m_terminal
Datasets m_datasets
std::string m_title
std::string m_xLegend
std::string m_yLegend
std::string m_extra

Detailed Description

a simple class to generate gnuplot-ready plotting commands from a set of datasets.

This class really represents a single graph on which multiple datasets can be plotted.

Definition at line 341 of file gnuplot.h.


Member Typedef Documentation

typedef std::vector<GnuplotDataset> ns3::Gnuplot::Datasets [private]

Definition at line 398 of file gnuplot.h.


Constructor & Destructor Documentation

ns3::Gnuplot::Gnuplot ( const std::string &  outputFilename = "",
const std::string &  title = "" 
)
Parameters:
outputFilename the name of the file where the rendering of the graph will be generated if you feed the command stream output by Gnuplot::GenerateOutput to the gnuplot program.
title title line of the plot page

Definition at line 562 of file gnuplot.cc.


Member Function Documentation

void ns3::Gnuplot::AddDataset ( const GnuplotDataset dataset  ) 
Parameters:
dataset add a dataset to the graph to be plotted.

Definition at line 617 of file gnuplot.cc.

void ns3::Gnuplot::AppendExtra ( const std::string &  extra  ) 
Parameters:
extra append extra gnuplot directive for output.

Definition at line 610 of file gnuplot.cc.

std::string ns3::Gnuplot::DetectTerminal ( const std::string &  filename  )  [static]

Crude attempt to auto-detect the correct terminal setting by inspecting the filename's extension.

Parameters:
filename output file name

Definition at line 569 of file gnuplot.cc.

void ns3::Gnuplot::GenerateOutput ( std::ostream &  os  )  const
Parameters:
os the output stream on which the relevant gnuplot commands should be generated. Including output file and terminal headers.

Definition at line 623 of file gnuplot.cc.

void ns3::Gnuplot::SetExtra ( const std::string &  extra  ) 
Parameters:
extra set extra gnuplot directive for output.

Definition at line 604 of file gnuplot.cc.

void ns3::Gnuplot::SetLegend ( const std::string &  xLegend,
const std::string &  yLegend 
)
Parameters:
xLegend the legend for the x horizontal axis
yLegend the legend for the y vertical axis

Definition at line 597 of file gnuplot.cc.

void ns3::Gnuplot::SetTerminal ( const std::string &  terminal  ) 
Parameters:
terminal terminal setting string for output. The default terminal string is "png"

Definition at line 585 of file gnuplot.cc.

void ns3::Gnuplot::SetTitle ( const std::string &  title  ) 
Parameters:
title set new plot title string to use for this plot.

Definition at line 591 of file gnuplot.cc.


Member Data Documentation

Definition at line 403 of file gnuplot.h.

std::string ns3::Gnuplot::m_extra [private]

Definition at line 408 of file gnuplot.h.

std::string ns3::Gnuplot::m_outputFilename [private]

Definition at line 400 of file gnuplot.h.

std::string ns3::Gnuplot::m_terminal [private]

Definition at line 401 of file gnuplot.h.

std::string ns3::Gnuplot::m_title [private]

Definition at line 405 of file gnuplot.h.

std::string ns3::Gnuplot::m_xLegend [private]

Definition at line 406 of file gnuplot.h.

std::string ns3::Gnuplot::m_yLegend [private]

Definition at line 407 of file gnuplot.h.


The documentation for this class was generated from the following files:
Generated on Thu Dec 3 14:10:05 2009 for NS-3 by  doxygen 1.6.3