企业建站哪个好,网站建设所用程序,成都手机网站制作,济南建筑公司实力排名雷达图/蜘蛛图
1 方法一
函数来源为MATLAB | 如何使用MATLAB绘制雷达图(蜘蛛图)
1.1 调用函数
1.2 案例
2 方法二
函数来源为MATLAB帮助-spider_plot
2.1 调用函数
语法#xff08;Syntax#xff09;#xff1a;
spider_plot(P)spider_plot(P, Name, Value, ...)h …雷达图/蜘蛛图
1 方法一
函数来源为MATLAB | 如何使用MATLAB绘制雷达图(蜘蛛图)
1.1 调用函数
1.2 案例
2 方法二
函数来源为MATLAB帮助-spider_plot
2.1 调用函数
语法Syntax
spider_plot(P)spider_plot(P, Name, Value, ...)h spider_plot(_)输入变量
P用于绘制蜘蛛图的数据点。行是数据组列是数据点。如果没有指定轴标签和轴限制则自动生成。[向量|矩阵]
输出变量
h蜘蛛图的图柄。(图对象)
名称-值对参数Name-Value Pair Arguments
名称说明备注AxesLabels用于指定每个轴的标签[自动生成(默认)/单元格的字符串/ ‘none’]AxesInterval用于更改显示在网页之间的间隔数[3(默认值)/ integer]AxesPrecision用于更改轴上显示的值的精度级别[1(默认)/ integer / vector]AxesDisplay用于更改显示轴文本的轴数。None’或’one’可用于简化规范化数据的图形外观[‘none’(默认)/ “没有”/“一”/“数据”/“data-percent”]
2.2 案例
2.2.1 案例1
成图如下所示 MATLAB实现代码如下
clc
close all
clear
%% 导入数据
pathFigure .\Figures\ ;
%% Example 1
% Initialize data points
D1 [5 3 9 1 2];
D2 [5 8 7 2 9];
D3 [8 2 1 4 6];
P [D1; D2; D3];% Spider plot
figure(1)
h spider_plot(P,...AxesLabels, {S1, S2, S3, S4, S5},...FillOption, {on, on, off},...FillTransparency, [0.2, 0.1, 0.1],...AxesLimits, [1, 2, 1, 1, 1; 10, 8, 9, 5, 10],... % [min axes limits; max axes limits]AxesPrecision, [0, 1, 1, 1, 1],...LineStyle, {--, -, --},...LineWidth, [1, 2, 3],...AxesFont, Times New Roman,...LabelFont, Times New Roman,...AxesFontSize, 12,...LabelFontSize, 12,...AxesLabelsEdge, none);% Legend settings
hl legend(D1, D2, D3, Location, northeast);
set(hl,Box,off,FontSize,14,Fontname, Times New Roman);str strcat(pathFigure, Figure1, .tiff);
print(gcf, -dtiff, -r600, str);2.2.2 案例2
成图如下所示 MATLAB实现代码如下
clc
close all
clear
%% 导入数据
pathFigure .\Figures\ ;
%% Example 2
% Initialize data points
D1 [5 3 9 1 2 2 9 3 1 9 8 7 2 3 6];
D2 [5 8 7 2 9 7 6 4 8 9 2 1 8 2 4];
D3 [8 2 1 4 6 1 8 4 2 3 7 5 6 1 6];
P [D1; D2; D3];% Spider plot
spider_plot(P,...AxesLimits, [0 0 0 0 0 0 0 0 0 0 0 0 0 0 0;...10 10 10 10 10 10 10 10 10 10 10 10 10 10 10],...AxesInterval, 5,...AxesDisplay, one,...AxesPrecision, 0,...AxesLabelsRotate, on,...AxesLabelsOffset, 0.1,...AxesRadial, off,...AxesFont, Times New Roman,...LabelFont, Times New Roman,...AxesFontSize, 12,...LabelFontSize, 12,...AxesLabelsEdge, none);% Legend settings
hl legend(D1, D2, D3, Location, northeast);
set(hl,Box,off,FontSize,14,Fontname, Times New Roman);str strcat(pathFigure, Figure2, .tiff);
print(gcf, -dtiff, -r600, str);参考
1.MATLAB | 如何使用MATLAB绘制雷达图(蜘蛛图) 2.MATLAB帮助-spider_plot