color of marks in polar plot
Show older comments
I want to make a polar plot. I have 16 pair of values and want to show them with markers as their colors changes gradually from pair 1 to pair 16. Could you please help me?
Accepted Answer
More Answers (1)
Walter Roberson
on 30 Apr 2011
0 votes
polar() the entire vector first. Then "hold on" and iterate through the theta/rho pairs polar()'ing each pair individually with the marker and color that you want for that point.
5 Comments
Hassan
on 30 Apr 2011
Walter Roberson
on 30 Apr 2011
No. polar() plots use line or lineseries objects to draw the lines, and line and lineseries objects are restricted to a single marker color per object. In order to have multiple marker colors, there has to be multiple objects.
Hassan
on 30 Apr 2011
Walter Roberson
on 30 Apr 2011
Well, you could interpolate (calculate) the colors you pass to polar() instead of using color letters.
You could polar() in the lines all at one time, and then you could convert the polar coordinates to cartesian and scatter() in the points, specifying a matrix of colors.
You could polar() in the lines all at one time, and then you could convert the polar coordinates to cartesian and then you could use patch() to draw very thin lines, and use vertex shading in the patch()
Hassan
on 30 Apr 2011
Categories
Find more on Polar Plots in Help Center and File Exchange
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!