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 next message
mirek is currently offline  mirek
Messages: 12840
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
Re: ScatterDraw::ExplicitRange [message #54938 is a reply to message #54935] Tue, 29 September 2020 19:22 Go to previous messageGo to next message
koldo is currently offline  koldo
Messages: 3221
Registered: August 2008
Senior Veteran
I will revert this change, as the way to limit a data series is using DataXRange.
An example of it is in ScatterCtrl/Data analysis/Operations.
Green plot source is the original blue plot, filtered by DataXRange with the limits set in the "Conditions" fields.
As soon as possible I will include an example.

index.php?t=getfile&id=6236&private=0
  • Attachment: Captu.png
    (Size: 51.45KB, Downloaded 56 times)


Best regards
IƱaki
Re: ScatterDraw::ExplicitRange [message #54940 is a reply to message #54938] Wed, 30 September 2020 00:00 Go to previous message
mirek is currently offline  mirek
Messages: 12840
Registered: November 2005
Ultimate Member
Removed.

Mirek
Previous Topic: ScatterDraw::LegendLine
Goto Forum:
  


Current Time: Thu Oct 29 00:54:56 CET 2020

Total time taken to generate the page: 0.04017 seconds