You are now following this Submission
- You will see updates in your followed content feed
- You may receive emails, depending on your communication preferences
Demo1
X = randi([-3, 8], [4, 7]) + rand([4, 7]);
% Create radar chart object.
RC = radarChart(X);
% Set R-axis limit and ticks.
RC.RLim = [-5,10];
RC.RTick = [-5,2,8,10];
% Draw radar chart.
RC = RC.draw();
% Display legend.
RC.legend();
Demo2
X = randi([2, 8], [4, 7]) + rand([4, 7]);
% Create radar chart object.
RC = radarChart(X);
% Set property names and class names.
RC.PropName = {'Modeling', 'Experiments', 'Programming', 'Summarizing', 'Writing', 'Innovation', 'Slacking'};
RC.ClassName = {'Peer A', 'Peer B', 'Peer C', 'Peer D'};
% Draw radar chart and display legend.
RC = RC.draw();
RC = RC.legend();
% 'Line' / 'Patch' / 'Both'
RC.setType('Patch');
demo3
% Initialize radar chart object with patch rendering type.
RC = radarChart(X, 'Type','Patch');
% Set R-axis tick label format to display three decimal places with unit.
RC.RTickLabelFormat = @(X) sprintf('%.3f cm',X);
% Set color for radar chart.
RC.CList = [78 101 155;
138 140 191;
184 168 207;
231 188 198;
253 207 158;
239 164 132;
182 118 108]./255;
% Draw radar chart and display legend.
RC=RC.draw();
RC.legend();
demo4
Data = rand([2, 10]);
RC = radarChart(Data);
RC.RLim = [0,1]; % Set the data range to be between 0 and 1
RC.RTick = [0,.5,1]; % Set radius ticks at 0, 0.5, and 1
RC.RRange = [.1,1]; % Set the range for the background (0.1 to 1)
RC.Rotation = pi/2; % Set the initial angle
RC.ThetaDir = 'reverse'; % Set the direction of the label arrangement
% Assign class and property labels
RC.ClassName = {'Stalk-like','Tip-like'};
RC.PropName = num2cell('A':'J');
% RC.PropName = {'A','B','C','D','E','F','G','H','I','J'}
RC.CList = [151,125,154; 179,97,97]./255;
RC = RC.draw();
% Customize visual appearance properties
RC.setPropLabel('FontSize', 21, 'FontName', 'Times New Roman'); % Property label formatting.
RC.setRTick('LineWidth', 2); % Radial tick mark thickness.
RC.setRLabel('Color', 'none'); % Hide radial axis labels.
RC.setBkg('EdgeColor', 'none'); % Remove background grid borders.
RC.setThetaTick('LineWidth', 2); % Angular tick line thickness.
RC.setType('Both'); % Render both line and patch styles.
% Configure line and marker properties for each data series
RC.setPatchN(1, 'LineWidth', 5, 'MarkerSize', 8); % Format class 1 (Stalk-like)
RC.setPatchN(2, 'LineWidth', 5, 'MarkerSize', 8); % Format class 2 (Tip-like)
% Generate and format legend
RC = RC.legend();
RC.setLegend('FontSize', 21, 'FontName', 'Times New Roman');
demo5
X = rand([3, 10]);
% Initialize radar chart object with patch rendering type.
RC4 = radarChart(X, 'Type','Both');
% Set color for radar chart.
RC4.CList = [78 101 155;
138 140 191;
184 168 207;
231 188 198;
253 207 158;
239 164 132;
182 118 108]./255;
RC4 = RC4.draw();
RC4.setPatchN(1, 'LineWidth', 5, 'MarkerSize', 8); % Format class 1
RC4.setPatchN(2, 'LineWidth', 5, 'MarkerSize', 8); % Format class 2
RC4.setRTick('LineWidth', 2); % Radial tick mark thickness.
RC4.setRLabel('Color', 'none'); % Hide radial axis labels.
RC4.setBkg('EdgeColor', 'none','FaceColor',[.9,.9,1]); % Remove background grid borders and change its color.
Cite As
Zhaoxu Liu / slandarer (2026). radar chart (https://uk.mathworks.com/matlabcentral/fileexchange/126450-radar-chart), MATLAB Central File Exchange. Retrieved .
General Information
- Version 2.1.1 (1.7 MB)
MATLAB Release Compatibility
- Compatible with any release
Platform Compatibility
- Windows
- macOS
- Linux
| Version | Published | Release Notes | Action |
|---|---|---|---|
| 2.1.1 | Change cover. |
||
| 2.1.0 | Further Description and Annotation. |
||
| 2.0.3 | Debug for legend. |
||
| 2.0.2 | New examples. |
||
| 2.0.1 | Some debug |
||
| 2.0.0 | # version 2.0.0
|
||
| 1.0.0 |
