12 private readonly
string color;
15 private int index = 1;
16 private bool first =
true;
21 protected readonly StringBuilder
graph =
new StringBuilder();
51 public string Color => this.color;
61 return this.index > 1;
71 if (Record.
Mean.HasValue)
73 else if (Record.
Count > 0)
90 this.x =
new Series(
"x" + this.index.ToString());
91 this.y =
new Series(
"y" + this.index.ToString());
105 this.graph.AppendLine(this.x.
EndSeries());
106 this.graph.AppendLine(this.y.
EndSeries());
125 for (i = 1; i < this.index; i++)
128 this.graph.Append(
'+');
130 this.graph.Append(
"plot2dline(x");
131 this.graph.Append(i.ToString());
132 this.graph.Append(
",y");
133 this.graph.Append(i.ToString());
134 this.graph.Append(
",\"");
135 this.graph.Append(this.color);
136 this.graph.Append(
"\",5)");
139 return this.graph.ToString();
Root node of a simulation model
Abstract base class for plots
double GetMeanTime(Statistic Record)
Gets the mean time of a statistic.
PlotLine(Model Model)
Plots a line graph
void AddPoint(double X, double Y)
Adds a point to the graph.
int Index
Current section index.
PlotLine(Model Model, string Color)
Plots a line graph
override void Break()
Breaks the graph.
override bool HasGraph
If there is a plot to display.
readonly StringBuilder graph
Graph being built.
override void Add(Statistic Record)
Adds a statistic to the plot.
override string GetPlotScript()
Gets the plot script
Represents a data series.
string EndSeries()
Ends the series.
void Add(double Value)
Adds a value to the series.
Represents collected statistical information from a small portion of time.
long Count
Number of events