Conversation
|
Hi @CoderPM2011, thanks so much for this PR! I may rework it a bit, but I intend to merge tonight. I recognize you put a lot of work into adding rotation to many of the path-based markers and added an inheritance system. To keep things simple I'll probably roll back the inheritance system and maybe add a static method somewhere that lets users rotate paths. However, I'm thinking the phasor system may benefit from using I may peter out before merging tonight, we'll see how far I get! I'll follow-up with a message here either way 👍 |
|
Actually, I'm hesitant to say this because I know this PR represents a lot of work and time 😅 .... but we may not actually need a phasor plot if we can add |
|
This strategy is looking promising! Maybe there's still a use case for having a // these are the points we will display
PolarCoordinates[] points = [
new (10, Angle.FromDegrees(15)),
new (20, Angle.FromDegrees(120)),
new (30, Angle.FromDegrees(240)),
];
// start by adding a polar axis to the plot
var polarAxis = myPlot.Add.PolarAxis(30);
polarAxis.LinePattern = LinePattern.Dotted;
// then place arrows representing each polar point
IPalette palette = new ScottPlot.Palettes.Category10();
Coordinates center = polarAxis.GetCoordinates(0, 0);
for (int i = 0; i < points.Length; i++)
{
Coordinates tip = polarAxis.GetCoordinates(points[i]);
var arrow = myPlot.Add.Arrow(center, tip);
arrow.ArrowLineWidth = 0;
arrow.ArrowFillColor = palette.GetColor(i).WithAlpha(.7);
} |
|
@swharden thanks for your reply. I hadn't noticed the existing Regarding the |




I added
PhasorLinesPlotand used it withPolarAxis(#4055) to implement the plot in #3939.PhasorLinesPlotmodified fromLinePlot.Endneeds to be set, sinceStartis already specified asOrigin, according to which the class has been adjusted.PaddingFractionandPaddingArcproperties were introduced because of the need to adjust the position of the line name labels.PaddingFractionis a scaling factor.It uses the smaller range length between the X and Y axes, multiplies it by the scaling factor, and then adds it to the label position.
PaddingArcis a coefficient designed for polar coordinate systems that represents the arc length from the label to the point.Since the radius is proportional to the arc length at the same angle, angles are not used to avoid differences in label positions with different radii.
Render()Markeraccording to the polar coordinates.Other changes
Marker.operator+andoperator-are added to it.If this is not appropriate, please feel free to change it. 😀
resolve #3939
Result Image
Use code