ultimatepp/examples/ScatterCtrl_Demo/tab15_RangePlot.cpp
koldo 235567dc83 ScatterCtrl_Demo: Adapted to new Process dialog
git-svn-id: svn://ultimatepp.org/upp/trunk@9648 f0d560ea-af0d-0410-9eb7-867de7ffcac7
2016-03-28 10:06:28 +00:00

34 lines
No EOL
910 B
C++

#include "ScatterCtrl_Demo.h"
void TabRangePlot::Init()
{
CtrlLayout(*this);
SizePos();
scatter.SetMouseHandling(true, true).ShowContextMenu().ShowPropertiesDlg().ShowProcessDlg();
for (double time = 0; time <= 10; time += 2.) {
Vector<double> &data = s1.Add();
double size = time * 10.;
data << time << ((size - 10) + Random(50)) << ((size - 4) + Random(50)) <<
((size + 4) + Random(50)) << ((size + 10) + Random(50));
}
idsRange << 1 << 2 << 3 << 4;
static Vector<int> idVoid;
scatter.AddSeries(s1, 0, Null, idVoid, idsRange, idVoid).Legend("Size").Units("m")
.MarkStyle<RangePlot>(RangePlot::MIN_AVG_MAX);
scatter.SetLabelY("Size").SetLabelX("time [seg]");
scatter.ZoomToFit(true, true, 0.2);
}
ScatterDemo *Construct15()
{
static TabRangePlot tab;
return &tab;
}
INITBLOCK {
RegisterExample("RangePlot", Construct15, __FILE__);
}