.ScatterDraw_Demo: Adjusted limits

git-svn-id: svn://ultimatepp.org/upp/trunk@15679 f0d560ea-af0d-0410-9eb7-867de7ffcac7
This commit is contained in:
koldo 2021-01-19 10:13:54 +00:00
parent 4eb88034e4
commit 4892deb544

View file

@ -23,22 +23,21 @@ CONSOLE_APP_MAIN
scatter.AddSeries(s1).Legend("Series 1").NoPlot().Units("ºC", "seg");
scatter.AddSeries(x, y).Units("ºC", "seg").Legend("Series 2").Stroke(5, Null)
.Dash(LINE_DASHED).MarkStyle<SquareMarkPlot>().MarkWidth(12);
SplineEquation spline;
VectorPointf s1data(s1);
spline.Fit(s1data);
scatter.AddSeries(spline).Legend("Series 1 Softened").NoMark().Dash(LINE_SOLID).Stroke(1.5);
scatter.AddSeries(x, y).Units("ºC", "seg").Legend("Series 2").Stroke(5, Null)
.Dash(LINE_DASHED).MarkStyle<SquareMarkPlot>().MarkWidth(12);
scatter.SetXYMin(10, 0).SetRange(50, 100).SetMinUnits(20, 0).SetMajorUnits(10, 20); // Done by hand
scatter.SetTitle("ScatterDraw_Demo").SetTitleFont(SansSerif(14).Bold());
scatter.SetLabelY("Temperature").SetLabelX("Time").SetLabelsFont(SansSerif(12));
scatter.SetPlotAreaLeftMargin(40).SetPlotAreaRightMargin(30).SetPlotAreaTopMargin(40).SetPlotAreaBottomMargin(50);
scatter.SetPlotAreaLeftMargin(70).SetPlotAreaRightMargin(30).SetPlotAreaTopMargin(40).SetPlotAreaBottomMargin(50);
scatter.SetSize(Size(1000, 500));
scatter.SetMode(ScatterDraw::MD_ANTIALIASED);
scatter.SetPlotAreaLeftMargin(70);
scatter.SetLegendAnchor(ScatterDraw::RIGHT_TOP);
PNGEncoder().SaveFile(fileName + ".png", scatter.GetImage());