a simple class to group together multiple gnuplots into one file, e.g. More...
#include "gnuplot.h"
Public Member Functions | |
GnuplotCollection (const std::string &outputFilename) | |
void | AddPlot (const Gnuplot &plot) |
void | GenerateOutput (std::ostream &os) |
void | GenerateOutput (std::ostream &osControl, std::ostream &osData, std::string dataFileName) |
Gnuplot & | GetPlot (unsigned int id) |
Return a pointer to one of the added plots. | |
void | SetTerminal (const std::string &terminal) |
Private Types | |
typedef std::vector< Gnuplot > | Plots |
Type of the Gnuplot collection. | |
Private Attributes | |
std::string | m_outputFilename |
Output file name. | |
Plots | m_plots |
Plots in the collection. | |
std::string | m_terminal |
Gnuplot "terminal" to use. | |
a simple class to group together multiple gnuplots into one file, e.g.
for PDF multi-page output terminals.
|
private |
ns3::GnuplotCollection::GnuplotCollection | ( | const std::string & | outputFilename | ) |
outputFilename | the name of the file where the rendering of the graph will be generated if you feed the command stream output by GnuplotCollection::GenerateOutput to the gnuplot program. |
Definition at line 895 of file gnuplot.cc.
void ns3::GnuplotCollection::AddPlot | ( | const Gnuplot & | plot | ) |
plot | add a plot to the collection to be plotted. |
Definition at line 908 of file gnuplot.cc.
References m_plots.
void ns3::GnuplotCollection::GenerateOutput | ( | std::ostream & | os | ) |
os | the output stream on which the relevant gnuplot commands should be generated. |
Definition at line 927 of file gnuplot.cc.
References m_outputFilename, m_plots, and m_terminal.
void ns3::GnuplotCollection::GenerateOutput | ( | std::ostream & | osControl, |
std::ostream & | osData, | ||
std::string | dataFileName ) |
osControl | the output stream on which the relevant gnuplot control commands should be generated. Including output file and terminal headers. |
osData | the output stream on which the relevant gnuplot data values should be generated. |
dataFileName | the name for the data file that will be written. |
Definition at line 949 of file gnuplot.cc.
References m_outputFilename, m_plots, and m_terminal.
Gnuplot & ns3::GnuplotCollection::GetPlot | ( | unsigned int | id | ) |
Return a pointer to one of the added plots.
id | index of plot to return |
Definition at line 914 of file gnuplot.cc.
References m_plots.
void ns3::GnuplotCollection::SetTerminal | ( | const std::string & | terminal | ) |
terminal | terminal setting string for output. The default terminal string is guessed from the output filename's extension. |
Definition at line 902 of file gnuplot.cc.
References m_terminal.
|
private |
Output file name.
Definition at line 521 of file gnuplot.h.
Referenced by GenerateOutput(), and GenerateOutput().
|
private |
Plots in the collection.
Definition at line 524 of file gnuplot.h.
Referenced by AddPlot(), GenerateOutput(), GenerateOutput(), and GetPlot().
|
private |
Gnuplot "terminal" to use.
Definition at line 522 of file gnuplot.h.
Referenced by GenerateOutput(), GenerateOutput(), and SetTerminal().