Take the 2-minute tour ×
Mathematica Stack Exchange is a question and answer site for users of Mathematica. It's 100% free, no registration required.

I have created a ListPolarPlot using the code below. I need to label the lines that extend from the centre to the outer ring. I do not want to label them with the values that these lines represent but rather with the values 1 to 7. I have tried LabelingFunction and some other things but these options don't work for ListPolarPlot. Can anyone help me with this ?

As a second best solution I could just label the plotted points themselves from 1 to 7 (starting at the right hand horizontal and working anticlockwise).

ListPolarPlot[
 Tooltip /@ {0.01422, 0.3425217, 0.30036, 0.013, 0.152, 0.3762, 
   0.122}, Joined -> True, 
 PlotMarkers -> Graphics@Disk[{0, 0}, Scaled[0.025]], 
 Axes -> {True, False}, PolarAxes -> Automatic, 
 PolarGridLines -> {{0.897, 0.897*2, 0.897*3, 0.897*4, 0.897*5, 
    0.897*6, 0.897*7}, {0.1, 0.2, 0.3}}, PolarTicks -> None, 
 AspectRatio -> 1/1, ImageSize -> {300, 300}]
share|improve this question
    
You have been a member of this site for 45 days now, asked three question, never accepted an answer, never voted and never answered a question. Please see my comment below –  belisarius Feb 21 '13 at 13:29
    
I suggest the following: 1) As you receive help, try to give it too, by answering questions in your area of expertise. 2) Read the faq! 3) When you see good questions and answers, vote them up by clicking the gray triangles, because the credibility of the system is based on the reputation gained by users sharing their knowledge. Also, please remember to accept the answer, if any, that solves your problem, by clicking the checkmark sign! –  belisarius Feb 21 '13 at 13:31
    
I have done 2 and 3 but I am still a beginner so all the unanswered questions are completely out of my depth. I do go through them from time to time though incase there is one I can help with! –  Lara Jordan Apr 3 '13 at 11:49
    
That's really good. Two comments: 1) Continue voting, and don't forget to vote up on the good answers you receive. 2) Just TRY to answer questions, it's a very good exercise. It doesn't matter if you can come up with a solution or not –  belisarius Apr 3 '13 at 12:01

2 Answers 2

up vote 1 down vote accepted

This will work for any number of points:

lpp[l_List] := ListPolarPlot[Tooltip /@ l,
  Joined -> True,
  PlotMarkers -> Graphics@Disk[{0, 0}, Scaled[0.025]],
  Axes -> {True, False},
  PolarAxes -> Automatic, 
  PolarGridLines -> {Array[2 Pi #/Length@l &, Length@l], {0.1, 0.2, 0.3}}, 
  PolarTicks -> Transpose[{Array[2 Pi #/Length@l &, Length@l], RotateLeft[Range@Length@l, 1]}],
  ImageSize -> {300, 300}]

l = RandomReal[{0, .3}, 10];
lpp[l]

Mathematica graphics

share|improve this answer
    
+1 how can you have an accepted answer with 0 votes? :) –  cormullion Apr 7 '13 at 15:23
    
@cormullion Lara is just starting to understand the site :) –  belisarius Apr 7 '13 at 15:41

You could replace your PolarTicks option with

PolarTicks -> Table[{(i - 1) (2 \[Pi])/7, i}, {i, 1, 7}]

or using your numerical values with

PolarTicks -> {{0.897, 2}, {0.897*2, 3}, {0.897*3, 4}, {0.897*4, 5}, {0.897*5, 6}, {0.897*6, 7}, {0.897*7, 1}}

The syntax is {position,label} for every tick.

ListPolarPlot[
Tooltip /@ {0.01422, 0.3425217, 0.30036, 0.013, 0.152, 0.3762, 
0.122}, Joined -> True, 
PlotMarkers -> Graphics@Disk[{0, 0}, Scaled[0.025]], 
Axes -> {True, False}, PolarAxes -> Automatic, 
PolarGridLines -> {{0.897, 0.897*2, 0.897*3, 0.897*4, 0.897*5, 
0.897*6, 0.897*7}, {0.1, 0.2, 0.3}}, AspectRatio -> 1/1, 
ImageSize -> {300, 300}, 
PolarTicks -> {{0.897, 2}, {0.897*2, 3}, {0.897*3, 4}, {0.897*4, 
5}, {0.897*5, 6}, {0.897*6, 7}, {0.897*7, 1}}]

Mathematica graphics

share|improve this answer
    
Thanks so much. –  Lara Jordan Feb 21 '13 at 10:02

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

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