How can I change the color of each axes label in a radar graph by using some condition
20 次查看(过去 30 天)
显示 更早的评论
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 个评论
回答(2 个)
Image Analyst
2023-2-13
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 个评论
Image Analyst
2023-2-14
I'm not familiar with that kind of plot. You might need to call tech support.
Walter Roberson
2023-2-14
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 个评论
另请参阅
类别
在 Help Center 和 File Exchange 中查找有关 Polar Plots 的更多信息
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!