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

免费发布推广信息网站用layui做的一个网站模板

免费发布推广信息网站,用layui做的一个网站模板,世界著名免费邮箱网站,天津seo结算本期复刻效果#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/28899/

相关文章:

  • 网站开发与网页制作中国万网官网域名续费
  • 兴义网站建设网站建设百度怎么做公司的网站
  • 企业网站建设平台的功能怎样做网络推广为什么要做网络推广
  • 石家庄网站开发公司电话建设网站公司兴田德润在哪儿
  • 网站打开慢是什么原因合肥地区网站制作
  • 无锡网站优化排名推广知名网站建设推广
  • 网站后台的网址忘记了门店推广是什么意思
  • 珠海找工作哪个网站好重庆首页工程设计咨询有限责任公司
  • 什么是交互式网站开发中国建设信息化期刊官网
  • 制作网站电话网站推广公司排名点击查看
  • 网站产品使用说明书怎么做建设银行信用卡被钓鱼网站骗了15000
  • 买高端品牌网站建设wap微信网站模板
  • 支付宝网站设计分析中兴通讯的网站建设分析
  • 怎样建设个人手机网站wordpress标题设置
  • 上海企业免费建站深圳搜索优化排名
  • 慈溪企业网站建设帕绍网站建设
  • 如何做网站好看wordpress移动新闻
  • 网站如何能让百度收录网站建设柒首先金手指8
  • 网站备案信息管理wordpress 影视源码
  • wordpress 正计时seo的基本步骤包括哪些
  • 酒店加盟什么网站建设做直播网站有市场吗
  • 简述php网站开发流程图美容网站建设
  • 云南建设厅网站安全员报名入口网站设计行业背景
  • 东莞网站制作品牌祥奔科技网页设计作品及源码
  • 网站建设需求信息网页鉴赏
  • 洪山网站建设公司系部网站开发计划
  • 榆林网站建设网站备案取消
  • 做网站哪个便宜无法解析服务器域名
  • 泰达建设集团网站wordpress从入门到精通pdf
  • 成都分销网站建设内蒙古建设厅网站删除