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 previous message
mirek is currently offline  mirek
Messages: 13975
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();

 
Read Message
Read Message
Previous Topic: Modifier methods organization
Next Topic: ScatterDraw::ExplicitRange
Goto Forum:
  


Current Time: Mon Apr 29 06:03:48 CEST 2024

Total time taken to generate the page: 0.02531 seconds