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::LegendLine
ScatterDraw::LegendLine [message #54936] Tue, 29 September 2020 15:57 Go to next message
mirek is currently offline  mirek
Messages: 13986
Registered: November 2005
Ultimate Member
Makes line in Legend drawn even for NoPlot series. Once again, needed for proper spline smoothing appearance. My code now looks like this:

				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().Legend(xy.title).LegendLine().Stroke(DPI(2), xy.color);
					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();

Re: ScatterDraw::LegendLine [message #54937 is a reply to message #54936] Tue, 29 September 2020 19:06 Go to previous message
koldo is currently offline  koldo
Messages: 3373
Registered: August 2008
Senior Veteran
Change is ugly. You would not let me add anything similar in your code. Anyway, I have finished your changes to make them stable.

Best regards
IƱaki
Previous Topic: Modifier methods organization
Next Topic: ScatterDraw::ExplicitRange
Goto Forum:
  


Current Time: Thu Jun 20 01:50:33 CEST 2024

Total time taken to generate the page: 0.02007 seconds