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: 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
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: 3354
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 244 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: 13975
Registered: November 2005
Ultimate Member
Removed.

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


Current Time: Thu Mar 28 11:23:03 CET 2024

Total time taken to generate the page: 0.01316 seconds