ultimatepp/examples/ScatterCtrl_Demo/tab6_Logarithmic.cpp
koldo ecb7a3db35 ScatterCtrl_Demo: Plot responsiveness and 2D surfaces added.
git-svn-id: svn://ultimatepp.org/upp/trunk@12445 f0d560ea-af0d-0410-9eb7-867de7ffcac7
2018-11-02 23:12:34 +00:00

31 lines
No EOL
654 B
C++

#include "ScatterCtrl_Demo.h"
void Tab6_Logarithmic::Init()
{
CtrlLayout(*this);
SizePos();
scatter.SetRange(6,100);
scatter.SetMajorUnits(1,20);
scatter.ShowInfo();
s1 <<Pointf(log10(10.0),14)<<Pointf(log10(1e2),25)<<Pointf(log10(1e3),39)<<Pointf(log10(1e4),44)<<Pointf(log10(1e5),76);
scatter.AddSeries(s1).Legend("series1");
scatter.cbModifFormatX = THISBACK(FormatX);
}
void Tab6_Logarithmic::FormatX(String& s, int i, double d)
{
s = FormatDouble(pow(10., d), 0);
}
ScatterDemo *Construct6()
{
static Tab6_Logarithmic tab;
return &tab;
}
INITBLOCK {
RegisterExample("Log", Construct6, __FILE__);
}