Overview
Examples
Screenshots
Comparisons
Applications
Download
Documentation
Tutorials
Bazaar
Status & Roadmap
FAQ
Authors & License
Forums
Funding Ultimate++
Search on this site
Search in forums












SourceForge.net Logo
Home » U++ Library support » ScatterDraw & ScatterCtrl » ScatterDraw::ExplicitRange
ScatterDraw::ExplicitRange [message #54935] Tue, 29 September 2020 15:43 Go to previous message
mirek is currently offline  mirek
Messages: 13975
Registered: November 2005
Ultimate Member
This allows to set x min/max for explicit equation. Introduced to fix the issue with spline interpolation - the problem was that it continued before and after the x range of original series.

For record, this is now my code that has some series "smoothed" (when xy.kind == 2)

				if(xy.kind == 2) {
					VectorXY& h = data.Create<VectorXY>(x, y);
					SplineEquation& e = spline.Add();
					e.Fit(h);
					scatter.AddSeries(e).NoMark().NoSeriesLegend().ExplicitRange(Min(x), Max(x));
				}
				else
					scatter.AddSeries(x, y);
				if(xy.title.GetCount() && xy.kind != 2)
					scatter.Legend(xy.title);
				if(xy.kind)
					scatter.Stroke(DPI(2), xy.color);
				else
					scatter.NoPlot();
				if(xy.point) {
					if(xy.kind == 2) {
						scatter.AddSeries(x, y).NoPlot();
						scatter.Legend(xy.title);
					}
					scatter.MarkWidth(DPI(12)).MarkColor(xy.point_color);
					switch(xy.point) {
					case 1: scatter.MarkStyle<RhombMarkPlot>(); break;
					case 2: scatter.MarkStyle<CircleMarkPlot>(); break;
					case 3: scatter.MarkStyle<SquareMarkPlot>(); break;
					case 4: scatter.MarkStyle<TriangleMarkPlot>(); break;
					}
				}
				else
					scatter.NoMark();


Now on to fix that legend cosmetics... Smile

Mirek
 
Read Message
Read Message
Read Message
Previous Topic: ScatterDraw::LegendLine
Next Topic: Entirely Null series is drawn as a random constant line
Goto Forum:
  


Current Time: Fri Mar 29 16:18:15 CET 2024

Total time taken to generate the page: 0.01422 seconds