Skip to content

Modify PolarAxis#4321

Merged
swharden merged 6 commits intoScottPlot:mainfrom
CoderPM2011:ModifyPolarAxis
Oct 12, 2024
Merged

Modify PolarAxis#4321
swharden merged 6 commits intoScottPlot:mainfrom
CoderPM2011:ModifyPolarAxis

Conversation

@CoderPM2011
Copy link
Contributor

  • fix clockwise and counterclockwise results of GetCoordinates()
    fixed Radar plot labels do not match data #4310
  • rename RotationDegrees to Rotation and change type to Angle
  • refactor GetCoordinates() with PolarCoordinates
  • synchronizes Rotation with the angular direction of the Cartesian coordinate system
    please refer to the following for differences

Default

var polarAxis = plot.Add.PolarAxis();

image

Rotating polar axis

polarAxis.Rotation = Angle.FromDegrees(90);

Before

image

After

image

@swharden
Copy link
Member

Thanks!

This also changes fixes the existing cookbook recipe

double[,] values = {
    { 78,  83, 84, 76, 43 },
    { 100, 50, 70, 60, 90 }
};

var radar = myPlot.Add.Radar(values);

string[] spokeLabels = { "Wins", "Poles", "Podiums", "Points", "DNFs" };
before after
image image

@swharden swharden enabled auto-merge (squash) October 12, 2024 16:59
@swharden swharden merged commit 1dbacd9 into ScottPlot:main Oct 12, 2024
@CoderPM2011 CoderPM2011 deleted the ModifyPolarAxis branch October 12, 2024 17:02
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Radar plot labels do not match data

2 participants