1
$\begingroup$

I am trying to make a polar graph of star positions. My current code is

obs1 = {{51 \[Degree], 53}, {45 \[Degree], 56}, {30 \[Degree], 
   62}, {19 \[Degree], 67}, {6 \[Degree], 70}, {11 \[Degree], 
   75}, {24 \[Degree], 71}}

ListPolarPlot[{obs1}, PlotRange -> {{-90, 90}, {-90, 90}}, 
 PolarGridLines -> Automatic]

Which gives me:

This

How do I make it so that: a. The 0 degree mark is the vertical axis instead of the horizontal axis b. The angles rotate clockwise instead of counter clockwise

$\endgroup$
1
  • $\begingroup$ In the documentation for ListPolarPlot, they mention that it is essentially just ListPlot (under "Properties and Relations"). Perhaps it's possible to DIY what you're looking for with ListPlot with the information given there. $\endgroup$
    – Carl Lange
    Commented May 7, 2019 at 18:12

1 Answer 1

2
$\begingroup$

I would just write a helper function to pre-process values. I've stripped the degree from the data and added it in the prep function. You can use the same function to preprocess values for the tick spec. In the case I have used, you specify the origin in the system with the directionality already applied. i.e. once you decide to move clockwise, the vertical is at -90 degrees.

obs1 = {{51, 53}, {45, 56}, {30, 62}, {19, 67}, {6, 70}, {11, 75}, {24, 71}}
lppPrep[{x_, y_}, dir_, orig_] := {(dir*(x + orig) ) \[Degree], y};

ListPolarPlot[
 {lppPrep[#, -1, -90] & /@ obs1}, PlotRange -> {{-90, 90}, {-90, 90}},
  PolarAxes -> Automatic, 
 PolarTicks -> {Most@
    Table[lppPrep[{i, i}, -1, -90], {i, 0, 360, 360/4}], Automatic}
 ]

enter image description here

$\endgroup$

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.