<?xml version="1.0" encoding="utf-8" standalone="yes"?><rss version="2.0" xmlns:atom="http://www.w3.org/2005/Atom"><channel><title>3D on 格物堂</title><link>https://gewutang.cn/tags/3d/</link><description>Recent content in 3D on 格物堂</description><generator>Hugo -- gohugo.io</generator><language>zh-cn</language><lastBuildDate>Mon, 28 Nov 2011 00:00:00 +0000</lastBuildDate><atom:link href="https://gewutang.cn/tags/3d/index.xml" rel="self" type="application/rss+xml"/><item><title>R中的3维HCPC图</title><link>https://gewutang.cn/2011/11/28/3d-graph-of-hcpc-in-r/</link><pubDate>Mon, 28 Nov 2011 00:00:00 +0000</pubDate><guid>https://gewutang.cn/2011/11/28/3d-graph-of-hcpc-in-r/</guid><description>&lt;p&gt;第四届R会议上，余苓提到了一个叫FactoMineR的包，这个包提供了一个可以绘制立体谱系图的函数plot.HCPC()。我记得之前有人在COS论坛上问过这个问题，我就特别留意了一下这个函数。&lt;/p&gt;&#10;&lt;p&gt;它的用法如下：&lt;/p&gt;&#10;&lt;pre&gt;&lt;code class="language-r"&gt;# 安装包,如果未安装&#10;# install.packages(&amp;quot;FactoMineR&amp;quot;)&#10;library(FactoMineR) #加载包&#10;data(iris) #加载数据&#10;res.hcpc &amp;lt;- HCPC(iris[1:4], nb.clust=3) #基于PC的聚类&#10;&lt;/code&gt;&lt;/pre&gt;&#10;&lt;p&gt;&lt;img src="https://gewutang.cn/2011/11/28/3d-graph-of-hcpc-in-r/index_files/figure-html/unnamed-chunk-1-1.png" width="672" /&gt;&lt;img src="https://gewutang.cn/2011/11/28/3d-graph-of-hcpc-in-r/index_files/figure-html/unnamed-chunk-1-2.png" width="672" /&gt;&lt;img src="https://gewutang.cn/2011/11/28/3d-graph-of-hcpc-in-r/index_files/figure-html/unnamed-chunk-1-3.png" width="672" /&gt;&lt;/p&gt;&#10;&lt;pre&gt;&lt;code class="language-r"&gt;plot.HCPC(res.hcpc, choice=&amp;quot;3D.map&amp;quot;, angle=60) #3D谱系图&#10;&lt;/code&gt;&lt;/pre&gt;&#10;&lt;img src="https://gewutang.cn/2011/11/28/3d-graph-of-hcpc-in-r/index_files/figure-html/unnamed-chunk-1-4.png" width="672" /&gt;&#10;&lt;p&gt;但是，这个图不够好，因为这个图缺少该有的交互性。等我有时间了，我会用rgl包重新写一个具有交互功能的立体谱系图。&lt;/p&gt;&#10;</description></item></channel></rss>