当前位置: 首页 > news >正文

建立网站底线资料管理系统

建立网站底线,资料管理系统,网站标题关键词,免费不需要登录的手游本期复刻效果#xff1a; 感觉出的聚类分析树状图绘制工具也不少了#xff0c;未来可能会统一整理为一个工具包#xff1f;(任重道远#xff0c;道阻且长)#xff1a; 代码讲解 0 数据设置 写了比较多的注释应该比较易懂#xff1a; clc; clear; close all% 样品起名s…本期复刻效果 感觉出的聚类分析树状图绘制工具也不少了未来可能会统一整理为一个工具包(任重道远道阻且长) 代码讲解 0 数据设置 写了比较多的注释应该比较易懂 clc; clear; close all% 样品起名slan1 slan2 slan3...slan75 sampleName compose(slan%d, 1:75);% 随机生成数据 % rng(10) Data rand(75,3);% 分类数 N 5;% 分类名 Class-A Class-B... className compose(Class-%c, 64 (1:N));% 设置字体 sampleFont {FontSize, 12, FontName, Times New Roman}; classFont {FontSize, 18, FontName, Times New Roman, FontWeight, bold};% 设置半径(树状图半径为1) % 样本文本 类弧形内侧 类弧形外侧 类文本 RSet [11/30, 1.22, 1.27, 1.35]; 分类数N不宜设置太大不然会出现比较多一个样本就是一个类的情况 1 配色 这里使用的是MATLAB自带lines配色 % 配色 CList lines(N);当然也比较推荐使用我写的slanCL配色包https://slandarer.blog.csdn.net/article/details/129828666 给几个比较好看的配色 % CList slanCL(251,1:N); % CList slanCL(495,1:N); % CList slanCL(1838,1:N); % CList slanCL(319,1:N); % CList slanCL(361,1:N); % CList slanCL(455,1:N);251 495 1838 2 创建绘图图窗 fig1 figure(Units, normalized, Position, [.1,.1,.5,.8], Color, w); ax1 gca; ax1.NextPlot add; ax1.DataAspectRatio [1,1,1]; ax1.XColor none; ax1.YColor none; axis tight fig2 figure();3 数据处理、绘制树状图、提取图形、关闭图窗 Z linkage(Data,average); T cluster(Z,maxclust,N); cutoff median([Z(end-(N-1),3), Z(end-(N-2),3)]); [LineSet, ~, order] dendrogram(Z, 0, Orientation, top); XSet reshape([LineSet(:).XData], 4, []).; YSet reshape([LineSet(:).YData], 4, []).; close(fig2)4 环形树状图 % 角度转换数据预处理 TT T(order); theta1 0; theta2 pi*2; theta3 (theta2-theta1)./size(Data,1); theta4 theta1 theta3/2; theta5 theta2 - theta3/2; maxY max(max(YSet)); tS linspace(0,1,50);% 绘制环形树状图 tT theta4 (theta5-theta4).*(XSet-1)./(size(Data,1)-1); tR maxY-YSet; tR [tR(:,1), tR(:,2).*ones(1,50), tR(:,4)].; tT [tT(:,1), tT(:,2)tS.*(tT(:,3)-tT(:,2)), tT(:,4)].; plot(ax1, tR.*cos(tT), tR.*sin(tT), Color, k, LineWidth, .7);5 添加标签文本 % 绘制样本名称标签 for i 1:length(order)tT theta4 (theta5-theta4).*(i-1)./(size(Data,1)-1);if tTpi/2 || tT3*pi/2text(ax1, maxY.*RSet(1).*cos(tT), maxY.*RSet(1).*sin(tT), sampleName{order(i)},...FontSize, 12, Rotation, tT./pi.*180, sampleFont{:});elsetext(ax1, maxY.*RSet(1).*cos(tT), maxY.*RSet(1).*sin(tT), sampleName{order(i)},...FontSize, 12, Rotation, tT./pi.*180180, HorizontalAlignment, right, sampleFont{:});end end6 绘制聚类信息 % 绘制分类信息 XSet [XSet(:,1:2); XSet(:,3:4)]; YSet [YSet(:,1:2); YSet(:,3:4)]; BSet (YSet(:,1)-cutoff).*(YSet(:,2)-cutoff)0; HSet (YSet(BSet,1)YSet(BSet,2))./2; Cset TT(round(XSet(BSet,1))); classNum unique(TT, stable);for i 1:length(classNum)% 绘制内部分类扇形tX [find(TTclassNum(i),1,first)-.5, find(TTclassNum(i),1,last).5];tR [maxY-HSet(CsetclassNum(i)), maxY];tT theta4 (theta5-theta4).*(tX-1)./(size(Data,1)-1);tR [tR(1), tR(2).*ones(1,50), tR(1), tR(1).*ones(1,50)];tT [tT(1), tT(1)tS.*(tT(2)-tT(1)), tT(2), tT(2)tS.*(tT(1)-tT(2))];patch(ax1, tR.*cos(tT), tR.*sin(tT), CList(i,:), EdgeColor, none, FaceAlpha, .25);% 绘制外部分类扇形tX [find(TTclassNum(i),1,first)-.2, find(TTclassNum(i),1,last).2];tR maxY.*RSet(1,2:3);tT theta4 (theta5-theta4).*(tX-1)./(size(Data,1)-1);tR [tR(1), tR(2).*ones(1,50), tR(1), tR(1).*ones(1,50)];tT [tT(1), tT(1)tS.*(tT(2)-tT(1)), tT(2), tT(2)tS.*(tT(1)-tT(2))];patch(ax1, tR.*cos(tT), tR.*sin(tT), CList(i,:), EdgeColor, none, FaceAlpha, .9);% 绘制分类信息标签tT mean(tT);if tTpitext(ax1, maxY.*RSet(4).*cos(tT), maxY.*RSet(4).*sin(tT), className{i}, Color, CList(i,:),...FontSize, 16, Rotation, tT./pi.*180-90, HorizontalAlignment, center, classFont{:});elsetext(ax1, maxY.*RSet(4).*cos(tT), maxY.*RSet(4).*sin(tT), className{i}, Color, CList(i,:),...FontSize, 16, Rotation, tT./pi.*180180-90, HorizontalAlignment, center, classFont{:});end end完整代码 % clusterTreeDemo % Copyright (c) 2024, Zhaoxu Liu / slandarerclc; clear; close all% 样品起名slan1 slan2 slan3...slan75 sampleName compose(slan%d, 1:75);% 随机生成数据 % rng(10) Data rand(75,3);% 分类数 N 5;% 分类名 Class-A Class-B... className compose(Class-%c, 64 (1:N));% 设置字体 sampleFont {FontSize, 12, FontName, Times New Roman}; classFont {FontSize, 18, FontName, Times New Roman, FontWeight, bold};% 设置半径(树状图半径为1) % 样本文本 类弧形内侧 类弧形外侧 类文本 RSet [11/30, 1.22, 1.27, 1.35]; % 配色 CList lines(N); % CList slanCL(251,1:N); % CList slanCL(495,1:N); % CList slanCL(1838,1:N); % CList slanCL(319,1:N); % CList slanCL(361,1:N); % CList slanCL(455,1:N);% % 绘图部分代码 % ------------------------------------------------------------------------- % 创建绘图图窗 fig1 figure(Units, normalized, Position, [.1,.1,.5,.8], Color, w); ax1 gca; ax1.NextPlot add; ax1.DataAspectRatio [1,1,1]; ax1.XColor none; ax1.YColor none; axis tight fig2 figure();% 数据处理、绘制树状图、提取图形、关闭图窗 Z linkage(Data,average); T cluster(Z,maxclust,N); cutoff median([Z(end-(N-1),3), Z(end-(N-2),3)]); [LineSet, ~, order] dendrogram(Z, 0, Orientation, top); XSet reshape([LineSet(:).XData], 4, []).; YSet reshape([LineSet(:).YData], 4, []).; close(fig2)% 角度转换数据预处理 TT T(order); theta1 0; theta2 pi*2; theta3 (theta2-theta1)./size(Data,1); theta4 theta1 theta3/2; theta5 theta2 - theta3/2; maxY max(max(YSet)); tS linspace(0,1,50);% 绘制环形树状图 tT theta4 (theta5-theta4).*(XSet-1)./(size(Data,1)-1); tR maxY-YSet; tR [tR(:,1), tR(:,2).*ones(1,50), tR(:,4)].; tT [tT(:,1), tT(:,2)tS.*(tT(:,3)-tT(:,2)), tT(:,4)].; plot(ax1, tR.*cos(tT), tR.*sin(tT), Color, k, LineWidth, .7);% 绘制样本名称标签 for i 1:length(order)tT theta4 (theta5-theta4).*(i-1)./(size(Data,1)-1);if tTpi/2 || tT3*pi/2text(ax1, maxY.*RSet(1).*cos(tT), maxY.*RSet(1).*sin(tT), sampleName{order(i)},...FontSize, 12, Rotation, tT./pi.*180, sampleFont{:});elsetext(ax1, maxY.*RSet(1).*cos(tT), maxY.*RSet(1).*sin(tT), sampleName{order(i)},...FontSize, 12, Rotation, tT./pi.*180180, HorizontalAlignment, right, sampleFont{:});end end% 绘制分类信息 XSet [XSet(:,1:2); XSet(:,3:4)]; YSet [YSet(:,1:2); YSet(:,3:4)]; BSet (YSet(:,1)-cutoff).*(YSet(:,2)-cutoff)0; HSet (YSet(BSet,1)YSet(BSet,2))./2; Cset TT(round(XSet(BSet,1))); classNum unique(TT, stable);for i 1:length(classNum)% 绘制内部分类扇形tX [find(TTclassNum(i),1,first)-.5, find(TTclassNum(i),1,last).5];tR [maxY-HSet(CsetclassNum(i)), maxY];tT theta4 (theta5-theta4).*(tX-1)./(size(Data,1)-1);tR [tR(1), tR(2).*ones(1,50), tR(1), tR(1).*ones(1,50)];tT [tT(1), tT(1)tS.*(tT(2)-tT(1)), tT(2), tT(2)tS.*(tT(1)-tT(2))];patch(ax1, tR.*cos(tT), tR.*sin(tT), CList(i,:), EdgeColor, none, FaceAlpha, .25);% 绘制外部分类扇形tX [find(TTclassNum(i),1,first)-.2, find(TTclassNum(i),1,last).2];tR maxY.*RSet(1,2:3);tT theta4 (theta5-theta4).*(tX-1)./(size(Data,1)-1);tR [tR(1), tR(2).*ones(1,50), tR(1), tR(1).*ones(1,50)];tT [tT(1), tT(1)tS.*(tT(2)-tT(1)), tT(2), tT(2)tS.*(tT(1)-tT(2))];patch(ax1, tR.*cos(tT), tR.*sin(tT), CList(i,:), EdgeColor, none, FaceAlpha, .9);% 绘制分类信息标签tT mean(tT);if tTpitext(ax1, maxY.*RSet(4).*cos(tT), maxY.*RSet(4).*sin(tT), className{i}, Color, CList(i,:),...FontSize, 16, Rotation, tT./pi.*180-90, HorizontalAlignment, center, classFont{:});elsetext(ax1, maxY.*RSet(4).*cos(tT), maxY.*RSet(4).*sin(tT), className{i}, Color, CList(i,:),...FontSize, 16, Rotation, tT./pi.*180180-90, HorizontalAlignment, center, classFont{:});end end完 以上已经是本文全部内容若懒得一一获取代码可以去以下gitee仓库获取全部代码 https://gitee.com/slandarer/PLTreprint/
http://www.zqtcl.cn/news/410703/

相关文章:

  • 开发网站用什么语言做名片的网站叫什么来着
  • 织梦做网站好不好iis中的网站启动不了
  • 临汾住房与城乡建设厅网站迎访问中国建设银行网站_
  • 织梦做的网站首页幻灯片怎么不能显示北大青鸟网站建设课程
  • 做淘客的网站有哪些延安市住建建设网站
  • 南京林业大学实验与建设网站现在都用什么软件搜索附近的人
  • 建站系统wordpress下载亚马逊雨林十大恐怖生物
  • 凡科网做网站怎么样专业团队电影
  • 有什么有趣的网站移动网站排名怎么做
  • 深圳网站建设专家wordpress 4.5下载地址
  • 网站建设公司公司我我提供一个平台wordpress如何去版权信息
  • seo怎么给网站做外链受欢迎的网站建设教程
  • 网站建设使用多语言河南电商网站设计
  • 网站搭建有免费的吗网站地图生成代码
  • 建设公司网站要注意什么投资小利润高的小生意
  • 网站建设需要做哪些工作做胃镜需那好天津津门网站A
  • 做网站申请域名的流程辽宁省工程造价网
  • 网站系统维护一般多长时间金华高端网站设计
  • 做网站公司销售开场白企业网站规划与开发
  • 兰州新区建站不锈钢网站建设
  • 淘宝小网站怎么做的电商网站有哪些
  • 哪些网站可以做画赚钱wordpress go跳转页
  • 怎么做新网站上线通稿深圳罗湖区网站建设公司
  • php 企业网站做网站可以赚钱吗
  • 局域网视频网站建设点播系统长沙3合1网站建设价格
  • 静态网站 服务器合肥做个网站什么价格
  • 宁阳网站设计家电网站设计方案
  • 网站备案icp秦皇岛黄金海岸
  • dedecms 金融类网站模板wordpress dux5.3
  • 学校网站源码wordpress向网站上传文件怎么做