How can I change the color of each axes label in a radar graph by using some condition
20 views (last 30 days)
Show older comments
I want to plot a radar graph with different color of the axes label. I attach the excel sheet in which I want to plot the data (D1,D2, ... D15), but the background of the label should be change according to the sample coloum. e.g if sample is 0 the color of D1 label should be black, if the sample is 10 then D2 label color should be green if the sample is 25 then D3 label color should be red and so on... I tried but the color of all label changes I want to change each label color accroding to the sample conditions.
2 Comments
Answers (2)
Image Analyst
on 13 Feb 2023
See my attached demo. See how you can get virtually everything on your graph and apply properties to it, like font size, color, etc.
2 Comments
Image Analyst
on 14 Feb 2023
I'm not familiar with that kind of plot. You might need to call tech support.
Walter Roberson
on 14 Feb 2023
spider_plot_class supports the following axes label options:
- AxesLabels -- specify the labels
- AxesLabelsEdge
- AxesInterpreter
- AxesLabelsRotate
When an axes label gets created, it gets created as a text() object. with the label edge set according to AxesLabelsEdge, and the text background color set according to the Background property. However, in the code AxesLabelsEdge can only be a single specification (not one per axes) and Background is used for a number of things, not just axes labels.
The created labels are stored in the object private property AxesTextLabels. The code has no provision to return those to the user.
So... in order to do this you have three choices:
- write your own spider plot chart that acts like you want; or
- modify the spider plot code from the file exchange to support one background per axes, separate from ; or
- take the object returned from spider_plot_class(), and struct() it so that you can gain access to AxesTextLabels object property, after which you can set the Background property of each text object in the array.
0 Comments
See Also
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!