Class to represent a 2D points plot. Set the line or points style using SetStyle() and set points using Add(). More...
#include <gnuplot.h>
Classes | |
struct | Data2d |
struct | Point |
Public Types | |
enum | Style { LINES, POINTS, LINES_POINTS, DOTS, IMPULSES, STEPS, FSTEPS, HISTEPS } |
enum | ErrorBars { NONE, X, Y, XY } |
Public Member Functions | |
Gnuplot2dDataset (const std::string &title="Untitled") | |
void | SetStyle (enum Style style) |
void | SetErrorBars (enum ErrorBars errorBars) |
void | Add (double x, double y) |
void | Add (double x, double y, double errorDelta) |
void | Add (double x, double y, double minY, double maxY) |
void | AddEmptyLine () |
Static Public Member Functions | |
static void | SetDefaultStyle (enum Style style) |
static void | SetDefaultErrorBars (enum ErrorBars errorBars) |
Private Types | |
typedef std::vector< struct Point > | PointSet |
Static Private Attributes | |
static enum Style | m_defaultStyle |
static enum ErrorBars | m_defaultErrorBars |
Class to represent a 2D points plot. Set the line or points style using SetStyle() and set points using Add().
Definition at line 105 of file gnuplot.h.
typedef std::vector<struct Point> ns3::Gnuplot2dDataset::PointSet [private] |
ns3::Gnuplot2dDataset::Gnuplot2dDataset | ( | const std::string & | title = "Untitled" |
) |
title | the title to be associated to this dataset. |
Create an empty dataset. Usually, the dataset's title is displayed in the legend box.
Definition at line 259 of file gnuplot.cc.
void ns3::Gnuplot2dDataset::Add | ( | double | x, | |
double | y, | |||
double | minY, | |||
double | maxY | |||
) |
x | x coord to new data point | |
y | y coord to new data point | |
minY | minimum error data point | |
maxY | maximum error data point |
Use this method with error bar style X or Y.
Definition at line 316 of file gnuplot.cc.
void ns3::Gnuplot2dDataset::Add | ( | double | x, | |
double | y, | |||
double | errorDelta | |||
) |
x | x coord to new data point | |
y | y coord to new data point | |
errorDelta | data point error range. |
Use this method with error bar style X or Y.
Definition at line 301 of file gnuplot.cc.
void ns3::Gnuplot2dDataset::Add | ( | double | x, | |
double | y | |||
) |
x | x coord to new data point | |
y | y coord to new data point |
Use this method with error bar style NONE.
Definition at line 287 of file gnuplot.cc.
void ns3::Gnuplot2dDataset::AddEmptyLine | ( | ) |
Add an empty line in the data output sequence. Empty lines in the plot data break continuous lines and do other things in the output.
Definition at line 331 of file gnuplot.cc.
void ns3::Gnuplot2dDataset::SetDefaultErrorBars | ( | enum ErrorBars | errorBars | ) | [static] |
Change default errorbars style for all newly created objects.
errorBars | the style of errorbars to use for newly created datasets. |
Definition at line 276 of file gnuplot.cc.
void ns3::Gnuplot2dDataset::SetDefaultStyle | ( | enum Style | style | ) | [static] |
Change default style for all newly created objects.
style | the style of plotting to use for newly created datasets. |
Definition at line 265 of file gnuplot.cc.
void ns3::Gnuplot2dDataset::SetErrorBars | ( | enum ErrorBars | errorBars | ) |
errorBars | the style of errorbars to display. |
If you use any style other than none, you need to make sure you store the delta information in this dataset with the right GnuplotDataset::Add method.
Definition at line 281 of file gnuplot.cc.
References m_defaultErrorBars.
void ns3::Gnuplot2dDataset::SetStyle | ( | enum Style | style | ) |
style | the style of plotting to use for this dataset. |
Definition at line 270 of file gnuplot.cc.
References m_defaultStyle.
enum ErrorBars ns3::Gnuplot2dDataset::m_defaultErrorBars [static, private] |
Definition at line 213 of file gnuplot.h.
Referenced by SetErrorBars().
enum Style ns3::Gnuplot2dDataset::m_defaultStyle [static, private] |
Definition at line 212 of file gnuplot.h.
Referenced by SetStyle().