📄 rlplot.h
字号:
private: LineDEF DataLine, OutLine, HatchLine; FillDEF Fill; Symbol *Sym; Label *Desc; DWORD flags; RECT hcr; void DefDesc(char *txt);};class Legend:public GraphObj{public: Legend(GraphObj *par, DataObj *d); Legend(int src); ~Legend(); double GetSize(int select); bool SetSize(int select, double value); void DoPlot(anyOutput *o); void DoMark(anyOutput *o, bool mark); bool Command(int cmd, void *tmpl, anyOutput *o); void RegGO(void *n);
bool FileIO(int rw); void Track(POINT *p, anyOutput *o); bool HasFill(LineDEF *ld, FillDEF *fd); bool HasSym(LineDEF *ld, GraphObj *sy);private: lfPOINT pos, lb_pos; RECT trc; anyOutput *to; fRECT B_Rect, C_Rect, D_Rect, E_Rect, F_Rect; long nItems; LegItem **Items;};class Plot:public GraphObj{public: fRECT Bounds; //contains minima and maxima for x and y bool dirty; //rescale before redraw; int use_xaxis, use_yaxis; //this plot uses its own axes lfPOINT xBounds, yBounds, zBounds; //like Bounds but in 3D space
int hidden; //plot (layer) is not visible Plot(GraphObj *par, DataObj *d); virtual double GetSize(int select); virtual bool SetSize(int select, double value){return false;}; virtual DWORD GetColor(int select); virtual bool SetColor(int select, DWORD col){return false;}; virtual void DoPlot(anyOutput *o){return;}; virtual bool Command(int cmd, void *tmpl, anyOutput *o){return false;}; virtual bool PropertyDlg(){return false;}; void CheckBounds(double x, double y); bool UseAxis(int idx); void ApplyAxes(anyOutput *o); void CheckBounds3D(double x, double y, double z); bool SavVarObs(GraphObj **gol, long ngo, DWORD flags); DataObj *CreaCumData(char *xr, char *yr, int mode, double base);};class PlotScatt:public Plot{public: char *xRange, *yRange;
long nPoints;
int DefSym;
lfPOINT BarDist;
Bar **Bars;
Symbol **Symbols;
DataLine *TheLine;
ErrorBar **Errors;
Label **Labels;
PlotScatt(GraphObj *par, DataObj *d, DWORD presel); PlotScatt(GraphObj *par, DataObj *d, int cBars, Bar **bars); PlotScatt(GraphObj *par, DataObj *d, int nPts, Symbol **sym, DataLine *lin); PlotScatt(int src); ~PlotScatt(); double GetSize(int select); bool SetSize(int select, double value); bool SetColor(int select, DWORD col); void DoPlot(anyOutput *target); virtual bool Command(int cmd, void *tmpl, anyOutput *o); virtual bool PropertyDlg(); void RegGO(void *n);
virtual bool FileIO(int rw);
bool ForEach(int cmd, void *tmp, anyOutput *o);
private: DWORD DefSel; char *ErrRange, *LbRange; Arrow **Arrows; DropLine **DropLines; bool CreateBarChart();};
class xyStat:public PlotScatt{
public:
xyStat(GraphObj *par, DataObj *d);
xyStat(int src);
~xyStat(); bool Command(int cmd, void *tmpl, anyOutput *o);
bool PropertyDlg();
virtual bool FileIO(int rw);
void CreateData();
private:
double ci;
DataObj *curr_data;
char *case_prefix;
};
class BarChart:public PlotScatt{public: BarChart(GraphObj *par, DataObj *d);};
class FreqDist:public Plot {
public:
FreqDist(GraphObj *par, DataObj *d);
FreqDist(int src);
~FreqDist();
void DoPlot(anyOutput *o);
bool Command(int cmd, void *tmpl, anyOutput *o);
bool PropertyDlg();
void RegGO(void *n);
bool FileIO(int rw);
private:
double start, step;
long nPlots;
char *ssRef;
LineDEF BarLine, HatchLine;
FillDEF BarFill;
DataObj *curr_data;
GraphObj **plots;
void ProcData(int sel);
};
class Regression:public Plot{public: Regression(GraphObj *par, DataObj *d); Regression(int src); ~Regression(); double GetSize(int select); bool SetSize(int select, double value); bool SetColor(int select, DWORD col); void DoPlot(anyOutput *target); bool Command(int cmd, void *tmpl, anyOutput *o); bool PropertyDlg(); void RegGO(void *n);
bool FileIO(int rw);private: long nPoints; char *xRange, *yRange; Symbol **Symbols; RegLine *rLine; SDellipse *sde; void Recalc();};class BubblePlot:public Plot{public: BubblePlot(GraphObj *par, DataObj *d); BubblePlot(int src); ~BubblePlot(); void DoPlot(anyOutput *target); DWORD GetColor(int select); bool Command(int cmd, void *tmpl, anyOutput *o); bool PropertyDlg(); void RegGO(void *n);
bool FileIO(int rw);private: long nPoints; LineDEF BubbleLine, BubbleFillLine; FillDEF BubbleFill; Bubble **Bubbles;};class PolarPlot:public Plot{public: PolarPlot(GraphObj *par, DataObj *d); PolarPlot(int src); ~PolarPlot(); double GetSize(int select); void DoPlot(anyOutput *o); bool Command(int cmd, void *tmpl, anyOutput *o); bool PropertyDlg(); void RegGO(void *n);
bool FileIO(int rw); bool AddPlot(); bool Config();private: int nPlots, nAxes; double offs; anyOutput *CurrDisp; fRECT CurrRect; LineDEF FillLine; FillDEF Fill; Plot **Plots; GraphObj **Axes; //Axis not yet defined};class BoxPlot:public Plot {public: BoxPlot(GraphObj *par, DataObj *d); BoxPlot(int src); BoxPlot(GraphObj *par, DataObj *dt, int mode, int c1, int c2, int c3); ~BoxPlot(); double GetSize(int select); bool SetSize(int select, double value); bool SetColor(int select, DWORD col); void DoPlot(anyOutput *o); bool Command(int cmd, void *tmpl, anyOutput *o); bool PropertyDlg(); void RegGO(void *n);
bool FileIO(int rw);
bool ForEach(int cmd, void *tmp, anyOutput *o);
void CreateData();private: char *xRange, *yRange, *case_prefix;
long nPoints;
double ci_box, ci_err; DataObj *curr_data;
lfPOINT BoxDist; Box **Boxes; Whisker **Whiskers; Symbol **Symbols;
Label **Labels; DataLine *TheLine;};class DensDisp:public Plot {public: DensDisp(GraphObj *par, DataObj *d); DensDisp(int src); ~DensDisp(); bool SetSize(int select, double value); bool SetColor(int select, DWORD col); void DoPlot(anyOutput *o); bool Command(int cmd, void *tmpl, anyOutput *o); bool PropertyDlg(); void RegGO(void *n);
bool FileIO(int rw);private: LineDEF DefLine, DefFillLine; FillDEF DefFill; long nPoints; char *xRange, *yRange; Box **Boxes; void DoUpdate();};class StackBar:public Plot{public: int numPlots, numXY, numPG, numPL; BoxPlot **Boxes; PlotScatt **xyPlots; DataPolygon **Polygons; DataLine **Lines; lfPOINT dspm; StackBar(GraphObj *par, DataObj *d); StackBar(int src); ~StackBar(); bool SetSize(int select, double value); void DoPlot(anyOutput *o); bool Command(int cmd, void *tmpl, anyOutput *o); bool PropertyDlg(); void RegGO(void *n);
bool FileIO(int rw);private: char *ssXrange, *ssYrange; double StartVal; int cum_data_mode; DataObj *CumData;};class StackPG:public StackBar{public: StackPG(GraphObj *par, DataObj *d);};class GroupBars:public StackBar{public: GroupBars(GraphObj *par, DataObj *d):StackBar(par, d){}; bool PropertyDlg();};class Waterfall:public StackBar{public: Waterfall(GraphObj *par, DataObj *d); bool PropertyDlg();};
class MultiLines:public StackBar{
public:
MultiLines(GraphObj *par, DataObj *d);
bool PropertyDlg();
};
class PieChart:public Plot {public: PieChart(GraphObj *par, DataObj *d); PieChart(int src); ~PieChart(); bool SetSize(int select, double value); void DoPlot(anyOutput *o); bool Command(int cmd, void *tmpl, anyOutput *o); bool PropertyDlg(); void RegGO(void *n);
bool FileIO(int rw); void DoUpdate();private: long nPts; char *ssRefA, *ssRefR; lfPOINT CtDef; double FacRad; segment **Segments;};class RingChart:public PieChart {public: RingChart(GraphObj *par, DataObj *d);};class GoGroup:public Plot {public: GraphObj **Objects; int nObs; lfPOINT fPos; GoGroup(GraphObj *par, DataObj *d); GoGroup(int src); ~GoGroup(); double GetSize(int select); void DoPlot(anyOutput *o); bool Command(int cmd, void *tmpl, anyOutput *o); void RegGO(void *n);
bool FileIO(int rw);};class StarChart:public GoGroup {public: StarChart(GraphObj *par, DataObj *d); bool PropertyDlg();private:};class Ribbon:public Plot {public: Ribbon(GraphObj *par, DataObj *d, double z, double width, char *xr, char *yr); Ribbon(GraphObj *par, DataObj *d, char *xr, char *yr, char *zr);
Ribbon(int src); ~Ribbon(); double GetSize(int select); bool SetSize(int select, double value); bool SetColor(int select, DWORD col); void DoPlot(anyOutput *o); bool Command(int cmd, void *tmpl, anyOutput *o); void RegGO(void *n);
bool FileIO(int rw);private: long nPlanes, nVal; double z_value, z_width, relwidth; char *ssRefX, *ssRefY, *ssRefZ; FillDEF Fill; LineDEF Line;
fPOINT3D *values; Plane3D **planes; void CreateObs(); void UpdateObs(bool bNewData);};
class Grid3D:public Plot {
public:
Grid3D(GraphObj *par, DataObj *d, int sel, double x1=0.0, double xstep=1.0, double z1=0.0, double zstep=1.0);
Grid3D(int src);
~Grid3D();
bool SetSize(int select, double value);
bool SetColor(int select, DWORD col);
void DoPlot(anyOutput *o);
bool Command(int cmd, void *tmpl, anyOutput *o);
void RegGO(void *n);
bool FileIO(int rw);
void CreateObs();
private:
long nLines, nPlanes;
fPOINT3D start, step;
LineDEF Line;
FillDEF Fill;
Line3D **lines;
Plane3D **planes;
};
class Scatt3D:public Plot{
public:
Scatt3D(GraphObj *par, DataObj *d, DWORD flags);
Scatt3D(GraphObj *par, DataObj *d, Brick **cols, long nob);
Scatt3D(GraphObj *par, DataObj *d, Sphere **ba, long nob);
Scatt3D(int src);
~Scatt3D();
double GetSize(int select);
bool SetSize(int select, double value);
bool SetColor(int select, DWORD col);
void DoPlot(anyOutput *o);
bool Command(int cmd, void *tmpl, anyOutput *o);
bool PropertyDlg();
void RegGO(void *n);
bool FileIO(int rw);
private:
long nBalls, nColumns, nDropLines, nArrows;
DWORD c_flags;
char *ssRefX, *ssRefY, *ssRefZ;
Line3D *Line;
Sphere **Balls;
Brick **Columns;
DropLine3D **DropLines;
Arrow3D **Arrows;
Ribbon *rib;
};
class Limits:public Plot {public: Limits(int src); ~Limits(); double GetSize(int select); bool Command(int cmd, void *tmpl, anyOutput *o); bool FileIO(int rw);};class Function:public Plot{public: Function(GraphObj *par, DataObj *d); Function(int src); ~Function(); bool SetSize(int select, double value); void DoPlot(anyOutput *o); bool Command(int cmd, void *tmpl, anyOutput *o); bool PropertyDlg(); void RegGO(void *n);
bool FileIO(int rw); bool Update(anyOutput *o, DWORD flags);
LineDEF *GetLine() {return &Line;};private: double x1,x2, xstep; LineDEF Line; char *param; char *cmdxy; DataLine *dl;};class FitFunc:public Plot{public:
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -