Wolfram Function Repository
Instant-use add-on functions for the Wolfram Language
Function Repository Resource:
Plot a polar dendrogram of a clustering
| ResourceFunction["PolarDendrogramPlot"][list] constructs a polar dendrogram from the hierarchical clustering of list. | 
| "CircularRange" | 1.95π | the radians of which to plot (from π to 2π) | 
| DistanceFunction | ManhattanDistance | the distance function to use in clustering | 
| "ExpansionFactor" | 1 | the amount to compress outer levels of the plot | 
| PlotStyle | Automatic | a graphics directive to style the plot | 
Create a simple polar dendrogram plot:
| In[1]:= | ![ResourceFunction["PolarDendrogramPlot"][RandomInteger[100, 50], ImageSize -> 200]](https://www.wolframcloud.com/obj/resourcesystem/images/139/139800de-aa5c-48ca-982f-2243bb859f69/3f8107ab3aa98d6c.png) | 
| Out[1]= |  | 
Compare a normal DendrogramPlot with a PolarDendrogramPlot:
| In[2]:= | ![Needs["HierarchicalClustering`"];
Through[{DendrogramPlot, ResourceFunction["PolarDendrogramPlot"]}[{1, 2, 10, 4, 8}]]](https://www.wolframcloud.com/obj/resourcesystem/images/139/139800de-aa5c-48ca-982f-2243bb859f69/04f85faf683796a7.png) | 
| Out[2]= |  | 
Style a large PolarDendrogramPlot:
| In[3]:= | ![ResourceFunction["PolarDendrogramPlot"][RandomInteger[10000, 300], "CircularRange" -> 2 \[Pi], ImageSize -> 400,
 PlotRangePadding -> Scaled[.05], PlotStyle -> Directive[Thickness[0.002], Hue[0.2]], Background -> Black]](https://www.wolframcloud.com/obj/resourcesystem/images/139/139800de-aa5c-48ca-982f-2243bb859f69/31bca885d43e36cf.png) | 
| Out[3]= |  | 
Change the "CircularRange" and "ExpansionFactor" options:
| In[7]:= | ![lst = RandomInteger[5000, 700];](https://www.wolframcloud.com/obj/resourcesystem/images/139/139800de-aa5c-48ca-982f-2243bb859f69/795502954534cf75.png) | 
| In[8]:= | ![Manipulate[
 ResourceFunction["PolarDendrogramPlot"][lst, "ExpansionFactor" -> e, "CircularRange" -> c, PlotStyle -> Directive[Hue[0.6]]], {{e, 1.5, "Expansion Factor"}, 1,
   3, Appearance -> "Labeled"}, {{c, 1.7 \[Pi], "Circular Range"}, 3 \[Pi]/2., 2 \[Pi], Appearance -> "Labeled"}]](https://www.wolframcloud.com/obj/resourcesystem/images/139/139800de-aa5c-48ca-982f-2243bb859f69/4d5a7e3aa372eb49.png) | 
| Out[8]= |  | 
Many of of the options supported by DendrogramPlot are not supported in PolarDendrogramPlot:
| In[9]:= | ![list = RandomInteger[20, 10];](https://www.wolframcloud.com/obj/resourcesystem/images/139/139800de-aa5c-48ca-982f-2243bb859f69/739bb72c77243b91.png) | 
| In[10]:= | ![Through[{DendrogramPlot, ResourceFunction["PolarDendrogramPlot"]}[
  list, LeafLabels -> (# &)]]](https://www.wolframcloud.com/obj/resourcesystem/images/139/139800de-aa5c-48ca-982f-2243bb859f69/0cfee55127de27f0.png) | 
| Out[10]= |  | 
This work is licensed under a Creative Commons Attribution 4.0 International License