ultimatepp/examples/ScatterCtrl_Demo/tab9.cpp
cxl 1057bc2b1b .Fixing svn directory structure
git-svn-id: svn://ultimatepp.org/upp/trunk@4892 f0d560ea-af0d-0410-9eb7-867de7ffcac7
2012-05-01 17:48:16 +00:00

33 lines
No EOL
773 B
C++

#include "ScatterCtrl_Demo.h"
void Tab9::Init()
{
CtrlLayout(*this);
HSizePos().VSizePos();
scatter.SetRange(100000,40).SetXYMin(0, -20);
scatter.SetMouseHandling(true).SetMaxZoom(500000).SetMinZoom(2);
for (int t = 0; t < 100000; ++t) {
s1 <<Pointf(t,20*sin(2*M_PI*t/100000));
s2 <<Pointf(t,15*cos(2*M_PI*t/100000));
}
scatter.AddSeries(s1).Legend("series1");
scatter.AddSeries(s2).Legend("series2");
scatter.ShowInfo();
fastView.WhenAction = THISBACK(OnFastView);
sequentialX.WhenAction = THISBACK(OnSequentialX);
fastView = true;
sequentialX = true;
OnFastView();
OnSequentialX();
}
ScatterDemo *Construct9()
{
static Tab9 tab;
return &tab;
}
INITBLOCK {
RegisterExample("Big dataset", Construct9, __FILE__);
}