PageSourceSearch

https://www.visualizing.org/assets/Dendrogram-GVFPoLWy.js

js visualizing.org collected 2026-09-24 18:12:30 UTC 29,935 bytes, 1 lines download raw bytes

1import{j as e,L as s}from"./vendor-react-CVijXI0n.js";import{S as n,b as o,h as l,a as d}from"./index-D0o2Sutv.js";import{C as c}from"./ChartBreadcrumb-BOBTh6lg.js";import{C as m,b as x}from"./ChartFAQ-DwXxlpIj.js";const a="https://www.visualizing.org",i=[{q:"What is a dendrogram?",a:'A dendrogram (from Greek dendron, "tree") is a tree diagram where the height of each branch point encodes the distance or dissimilarity at which two clusters merge. Individual observations sit at the bottom as leaves, and successively larger clusters form as you move upward.'},{q:"When should you use a dendrogram?",a:"Use a dendrogram when presenting hierarchical clustering results. It also works well when showing evolutionary or phylogenetic relationships, and when exploring natural groupings at multiple granularity levels."},{q:"When should you avoid a dendrogram?",a:"Avoid a dendrogram when you have thousands of leaves — it becomes an unreadable wall. It is also a poor fit when the distance metric is arbitrary or meaningless, or when you need non-hierarchical clusters — use k-means scatter plots instead."},{q:"What is another name for a dendrogram?",a:"Dendrogram is also known as Cluster tree, hierarchical clustering tree. The name varies between fields, but the visualisation technique is the same."},{q:"What size of dataset works best for a dendrogram?",a:"Dendrogram works best for Clustering results, similarity analysis, phylogenetics. Outside that range the chart either looks empty or becomes too cluttered to read clearly."},{q:"Is a dendrogram suitable for dashboards?",a:"Yes — a dendrogram can work well in dashboards as long as the panel is large enough for readers to perceive the encoded values, has a clear title, and includes the legend or axis labels needed to interpret it."}],h=x("/dendrogram",i),p={"@context":"https://schema.org","@graph":[{"@type":"WebPage","@id":`${a}/dendrogram/#webpage`,url:`${a}/dendrogram`,name:"Dendrogram — The Definitive Guide",description:"Learn what a dendrogram is, how to read one step by step, when to use dendrograms vs other chart types, and common mistakes to avoid.",isPartOf:{"@id":`${a}/#website`},breadcrumb:{"@id":`${a}/dendrogram/#breadcrumb`},mainEntity:{"@id":`${a}/dendrogram/#article`},inLanguage:"en"},o({slug:"/dendrogram",caption:"Example dendrogram",width:620,height:280}),{"@type":["Article","LearningResource"],"@id":`${a}/dendrogram/#article`,mainEntityOfPage:{"@id":`${a}/dendrogram/#webpage`},headline:"Dendrogram: Definition, How to Read, and When to Use",description:"A complete reference guide to dendrograms — what they are, how to interpret them, when to use them, and common mistakes to avoid.",image:{"@id":l("/dendrogram")},datePublished:"2025-03-15",dateModified:"2026-04-08",publisher:{"@id":`${a}/#organization`},inLanguage:"en",educationalLevel:"intermediate",learningResourceType:"reference",teaches:["How to read and interpret dendrograms","When to use dendrograms for data visualization","Common dendrogram mistakes and how to avoid them"],competencyRequired:"Basic understanding of clustering and similarity",timeRequired:"PT12M",isAccessibleForFree:!0,audience:{"@type":"EducationalAudience",educationalRole:"student"},about:{"@id":`${a}/dendrogram/#term`},keywords:["dendrogram","data visualization","clustering","hierarchical clustering","phylogenetic tree"]},{"@type":"DefinedTerm","@id":`${a}/dendrogram/#term`,name:"Dendrogram",description:"A tree diagram used to illustrate the arrangement of clusters produced by hierarchical clustering, where the height of each branch point encodes the distance or dissimilarity at which clusters merge.",inDefinedTermSet:{"@id":`${a}/chart-types/#termset`},termCode:"dendrogram",url:`${a}/dendrogram`,sameAs:"https://en.wikipedia.org/wiki/Dendrogram"},{"@type":"DefinedTermSet","@id":`${a}/chart-types/#termset`,name:"Data Visualization Chart Types",url:`${a}/chart-types`},d("/dendrogram"),h]},g=[{id:"the-chart",label:"The chart"},{id:"what-is-it",label:"What is it?"},{id:"anatomy",label:"Anatomy"},{id:"when-to-use",label:"When to use it"},{id:"how-to-read",label:"How to read it"},{id:"common-mistakes",label:"Common mistakes"},{id:"real-world-examples",label:"Real-world examples"},{id:"key-facts",label:"Quick reference"},{id:"variations",label:"Variations"},{id:"faqs",label:"FAQs"},{id:"related-charts",label:"Related charts"}];function y(){return e.jsxs(e.Fragment,{children:[e.jsx(n,{title:"Dendrogram: What It Is, When To Use It & Examples",description:"Dendrogram guide: what it is, when to use it for hierarchy analysis, real examples, common pitfalls, and tools to build one yourself.",path:"/dendrogram",ogType:"article",jsonLd:[p]}),e.jsx(c,{slug:"/dendrogram"}),e.jsxs("div",{className:"max-w-[1100px] mx-auto px-6 md:px-12",children:[e.jsxs("div",{className:"py-[56px] pb-[48px] border-b border-[var(--border-color)]",children:[e.jsxs("div",{className:"flex items-center gap-3 mb-5",children:[e.jsx("span",{className:"font-mono text-[10px] tracking-[0.12em] uppercase bg-[var(--accent-light)] text-[var(--accent-color)] px-[10px] py-[4px] rounded-[3px] font-medium",children:"Hierarchy"}),e.jsx("span",{className:"font-mono text-[10px] tracking-[0.10em] uppercase bg-[var(--bg-alt)] text-[var(--ink-muted)] px-[10px] py-[4px] rounded-[3px]",children:"Intermediate"})]}),e.jsx("h1",{className:"font-serif text-[42px] md:text-[52px] font-normal tracking-[-0.025em] leading-[1.1] text-[var(--ink)] mb-4",children:"Dendrogram"}),e.jsx("p",{className:"text-[17px] md:text-[19px] font-light text-[var(--ink-muted)] leading-[1.6] max-w-[640px]",children:"A tree-shaped diagram where branch heights encode the distance at which clusters merge — the go-to visualization for hierarchical clustering results."})]}),e.jsxs("div",{className:"grid grid-cols-1 md:grid-cols-[1fr_280px] gap-16 pt-12 items-start",children:[e.jsxs("div",{className:"min-w-0",children:[e.jsxs("section",{className:"py-14 border-b border-[var(--border-color)]",id:"the-chart",children:[e.jsx("p",{className:"font-mono text-[10px] tracking-[0.14em] uppercase text-[var(--accent-color)] mb-3",children:"// 01 — The chart"}),e.jsx("h2",{className:"font-serif text-[28px] md:text-[30px] font-normal tracking-[-0.02em] text-[var(--ink)] mb-6 leading-[1.2]",children:"What it looks like"}),e.jsxs("div",{className:"bg-[var(--bg-card)] border border-[var(--border-color)] rounded-[12px] p-6 md:p-10 mt-8 mb-2",children:[e.jsx("div",{className:"font-mono text-[10px] tracking-[0.10em] uppercase text-[var(--ink-faint)] mb-6 flex justify-between items-center",children:e.jsxs("span",{children:["Example — ",e.jsx("em",{className:"not-italic text-[var(--accent-color)] font-medium",children:"Hierarchical clustering of six data samples"})]})}),e.jsxs("svg",{viewBox:"0 0 620 280",xmlns:"http://www.w3.org/2000/svg",className:"w-full block",children:[e.jsx("line",{x1:"20",y1:"20",x2:"20",y2:"260",stroke:"#1a1a18",strokeWidth:"0.5",strokeOpacity:"0.12"}),e.jsx("text",{x:"14",y:"265",textAnchor:"end",fill:"#6b6b67",fontSize:"9",fontFamily:"DM Mono, monospace",children:"0"}),e.jsx("text",{x:"14",y:"205",textAnchor:"end",fill:"#6b6b67",fontSize:"9",fontFamily:"DM Mono, monospace",children:"2"}),e.jsx("text",{x:"14",y:"145",textAnchor:"end",fill:"#6b6b67",fontSize:"9",fontFamily:"DM Mono, monospace",children:"4"}),e.jsx("text",{x:"14",y:"85",textAnchor:"end",fill:"#6b6b67",fontSize:"9",fontFamily:"DM Mono, monospace",children:"6"}),e.jsx("text",{x:"14",y:"25",textAnchor:"end",fill:"#6b6b67",fontSize:"9",fontFamily:"DM Mono, monospace",children:"8"}),e.jsx("line",{x1:"80",y1:"260",x2:"80",y2:"220",stroke:"#c94a2e",strokeWidth:"2"}),e.jsx("line",{x1:"160",y1:"260",x2:"160",y2:"220",stroke:"#c94a2e",strokeWidth:"2"}),e.jsx("line",{x1:"80",y1:"220",x2:"160",y2:"220",stroke:"#c94a2e",strokeWidth:"2"}),e.jsx("line",{x1:"240",y1:"260",x2:"240",y2:"200",stroke:"#2e7d52",strokeWidth:"2"}),e.jsx("line",{x1:"320",y1:"260",x2:"320",y2:"200",stroke:"#2e7d52",strokeWidth:"2"}),e.jsx("line",{x1:"240",y1:"200",x2:"320",y2:"200",stroke:"#2e7d52",strokeWidth:"2"}),e.jsx("line",{x1:"120",y1:"220",x2:"120",y2:"120",stroke:"#c94a2e",strokeWidth:"2"}),e.jsx("line",{x1:"280",y1:"200",x2:"280",y2:"120",stroke:"#2e7d52",strokeWidth:"2"}),e.jsx("line",{x1:"120",y1:"120",x2:"280",y2:"120",stroke:"#e8c4b8",strokeWidth:"2"}),e.jsx("line",{x1:"440",y1:"260",x2:"440",y2:"180",stroke:"#6b6b67",strokeWidth:"2"}),e.jsx("line",{x1:"520",y1:"260",x2:"520",y2:"180",stroke:"#6b6b67",strokeWidth:"2"}),e.jsx("line",{x1:"440",y1:"180",x2:"520",y2:"180",stroke:"#6b6b67",strokeWidth:"2"}),e.jsx("line",{x1:"200",y1:"120",x2:"200",y2:"50",stroke:"#e8c4b8",strokeWidth:"2"}),e.jsx("line",{x1:"480",y1:"180",x2:"480",y2:"50",stroke:"#6b6b67",strokeWidth:"2"}),e.jsx("line",{x1:"200",y1:"50",x2:"480",y2:"50",stroke:"#1a1a18",strokeWidth:"2",strokeOpacity:"0.4"}),e.jsx("text",{x:"80",y:"275",textAnchor:"middle",fill:"#c94a2e",fontSize:"10",fontFamily:"DM Mono, monospace",fontWeight:"500",children:"A"}),e.jsx("text",{x:"160",y:"275",textAnchor:"middle",fill:"#c94a2e",fontSize:"10",fontFamily:"DM Mono, monospace",fontWeight:"500",children:"B"}),e.jsx("text",{x:"240",y:"275",textAnchor:"middle",fill:"#2e7d52",fontSize:"10",fontFamily:"DM Mono, monospace",children:"C"}),e.jsx("text",{x:"320",y:"275",textAnchor:"middle",fill:"#2e7d52",fontSize:"10",fontFamily:"DM Mono, monospace",children:"D"}),e.jsx("text",{x:"440",y:"275",textAnchor:"middle",fill:"#6b6b67",fontSize:"10",fontFamily:"DM Mono, monospace",children:"E"}),e.jsx("text",{x:"520",y:"275",textAnchor:"middle",fill:"#6b6b67",fontSize:"10",fontFamily:"DM Mono, monospace",children:"F"}),e.jsx("line",{x1:"22",y1:"120",x2:"600",y2:"120",stroke:"#c94a2e",strokeWidth:"0.5",strokeDasharray:"6,4",strokeOpacity:"0.3"}),e.jsx("text",{x:"608",y:"124",fill:"#c94a2e",fontSize:"9",fontFamily:"DM Mono, monospace",fontWeight:"500",children:"cut"})]}),e.jsxs("p",{className:"text-[13px] text-[var(--ink-muted)] text-center italic mt-4",children:["A dendrogram showing hierarchical clustering of six samples. The dashed line indicates a cut that produces three cluster
1s: ","{A,B}",", ","{C,D}",", ","{E,F}","."]})]})]}),e.jsxs("section",{className:"py-14 border-b border-[var(--border-color)]",id:"what-is-it",children:[e.jsx("p",{className:"font-mono text-[10px] tracking-[0.14em] uppercase text-[var(--accent-color)] mb-3",children:"// 02 — Definition"}),e.jsx("h2",{className:"font-serif text-[28px] md:text-[30px] font-normal tracking-[-0.02em] text-[var(--ink)] mb-6 leading-[1.2]",children:"What is a dendrogram?"}),e.jsxs("div",{className:"text-[16px] font-light text-[var(--ink)] leading-[1.75]",children:[e.jsxs("p",{children:["A dendrogram (from Greek ",e.jsx("em",{children:"dendron"}),", “tree”) is a tree diagram where the ",e.jsx("strong",{className:"font-medium",children:"height of each branch point encodes the distance or dissimilarity"})," at which two clusters merge. Individual observations sit at the bottom as leaves, and successively larger clusters form as you move upward."]}),e.jsxs("p",{className:"mt-[18px]",children:["Unlike a regular tree diagram (where link lengths are arbitrary), dendrograms have a ",e.jsx("strong",{className:"font-medium",children:"meaningful vertical axis"}),". The higher a merge occurs, the more dissimilar the two clusters being combined. This makes dendrograms the standard output of hierarchical clustering algorithms."]}),e.jsxs("p",{className:"mt-[18px]",children:["To decide on the number of clusters, you draw a ",e.jsx("strong",{className:"font-medium",children:"horizontal cut line"})," across the dendrogram. The number of vertical branches that cross this line equals the number of clusters. Moving the cut line up produces fewer, coarser clusters; moving it down produces more, finer clusters."]})]}),e.jsx("div",{className:"bg-[var(--accent-light)] border-l-[3px] border-l-[var(--accent-color)] rounded-r-[8px] px-5 py-4 mt-6",children:e.jsxs("p",{className:"text-[14px] text-[var(--ink)] leading-[1.65] font-light",children:[e.jsx("strong",{className:"font-medium text-[var(--accent-color)]",children:"Linkage matters:"})," The shape of a dendrogram depends entirely on the linkage method used (single, complete, average, Ward). Different methods can produce very different trees from the same data. Always report which linkage method was used."]})})]}),e.jsxs("section",{className:"py-14 border-b border-[var(--border-color)]",id:"anatomy",children:[e.jsx("p",{className:"font-mono text-[10px] tracking-[0.14em] uppercase text-[var(--accent-color)] mb-3",children:"// 03 — Anatomy"}),e.jsx("h2",{className:"font-serif text-[28px] md:text-[30px] font-normal tracking-[-0.02em] text-[var(--ink)] mb-6 leading-[1.2]",children:"Parts of a dendrogram"}),e.jsxs("div",{className:"bg-[var(--bg-card)] border border-[var(--border-color)] rounded-[12px] p-6 md:p-10 mt-8",children:[e.jsxs("svg",{viewBox:"0 0 580 200",xmlns:"http://www.w3.org/2000/svg",className:"w-full block",children:[e.jsx("line",{x1:"30",y1:"10",x2:"30",y2:"180",stroke:"#1a1a18",strokeWidth:"0.5",strokeOpacity:"0.12"}),e.jsx("line",{x1:"100",y1:"180",x2:"100",y2:"140",stroke:"#c94a2e",strokeWidth:"2"}),e.jsx("line",{x1:"180",y1:"180",x2:"180",y2:"140",stroke:"#c94a2e",strokeWidth:"2"}),e.jsx("line",{x1:"100",y1:"140",x2:"180",y2:"140",stroke:"#c94a2e",strokeWidth:"2"}),e.jsx("line",{x1:"300",y1:"180",x2:"300",y2:"120",stroke:"#2e7d52",strokeWidth:"2"}),e.jsx("line",{x1:"400",y1:"180",x2:"400",y2:"120",stroke:"#2e7d52",strokeWidth:"2"}),e.jsx("line",{x1:"300",y1:"120",x2:"400",y2:"120",stroke:"#2e7d52",strokeWidth:"2"}),e.jsx("line",{x1:"140",y1:"140",x2:"140",y2:"50",stroke:"#e8c4b8",strokeWidth:"2"}),e.jsx("line",{x1:"350",y1:"120",x2:"350",y2:"50",stroke:"#e8c4b8",strokeWidth:"2"}),e.jsx("line",{x1:"140",y1:"50",x2:"350",y2:"50",stroke:"#1a1a18",strokeWidth:"2",strokeOpacity:"0.4"}),e.jsx("circle",{cx:"100",cy:"185",r:"6",fill:"#c94a2e"}),e.jsx("circle",{cx:"180",cy:"185",r:"6",fill:"#c94a2e"}),e.jsx("circle",{cx:"300",cy:"185",r:"6",fill:"#2e7d52"}),e.jsx("circle",{cx:"400",cy:"185",r:"6",fill:"#2e7d52"}),e.jsx("line",{x1:"100",y1:"185",x2:"85",y2:"198",stroke:"#c94a2e",strokeWidth:"1"}),e.jsx("text",{x:"75",y:"210",fill:"#c94a2e",fontSize:"10",fontFamily:"DM Mono, monospace",children:"A"}),e.jsx("line",{x1:"140",y1:"140",x2:"155",y2:"130",stroke:"#6b6b67",strokeWidth:"1"}),e.jsx("text",{x:"162",y:"130",fill:"#6b6b67",fontSize:"10",fontFamily:"DM Mono, monospace",children:"B"}),e.jsx("line",{x1:"35",y1:"50",x2:"50",y2:"50",stroke:"#2e7d52",strokeWidth:"1",strokeDasharray:"3,2"}),e.jsx("text",{x:"55",y:"45",fill:"#2e7d52",fontSize:"10",fontFamily:"DM Mono, monospace",children:"C"}),e.jsx("line",{x1:"480",y1:"100",x2:"550",y2:"100",stroke:"#c94a2e",strokeWidth:"0.5",strokeDasharray:"6,4",strokeOpacity:"0.5"}),e.jsx("text",{x:"552",y:"104",fill:"#c94a2e",fontSize:"10",fontFamily:"DM Mono, monospace",children:"D"})]}),e.jsx("div",{className:"flex flex-wrap gap-3 mt-7",children:[{color:"#c94a2e",label:"A — Leaves:",desc:"Individual observations at the bottom of the tree — the most granular level"},{color:"#6b6b67",label:"B — Merge points:",desc:"Horizontal bars connecting two branches — height encodes the distance at which clusters merge"},{color:"#2e7d52",label:"C — Distance axis:",desc:"Vertical axis measuring dissimilarity — higher means more different"},{color:"#c94a2e",label:"D — Cut line:",desc:"A horizontal line drawn to determine the number of cluster
1s — branches crossing it define cluster membership"}].map((t,r)=>e.jsxs("div",{className:"flex items-center gap-2 bg-[var(--bg-alt)] rounded-[4px] px-[14px] py-2 text-[13px]",children:[e.jsx("span",{className:"w-[10px] h-[10px] rounded-full shrink-0",style:{background:t.color}}),e.jsxs("span",{className:"text-[var(--ink-muted)]",children:[e.jsx("strong",{className:"text-[var(--ink)] font-medium",children:t.label})," ",t.desc]})]},r))})]})]}),e.jsxs("section",{className:"py-14 border-b border-[var(--border-color)]",id:"when-to-use",children:[e.jsx("p",{className:"font-mono text-[10px] tracking-[0.14em] uppercase text-[var(--accent-color)] mb-3",children:"// 04 — Usage"}),e.jsx("h2",{className:"font-serif text-[28px] md:text-[30px] font-normal tracking-[-0.02em] text-[var(--ink)] mb-6 leading-[1.2]",children:"When to use it — and when not to"}),e.jsxs("div",{className:"grid grid-cols-1 sm:grid-cols-2 gap-5 mt-7",children:[e.jsxs("div",{className:"bg-[var(--green-light)] border border-[var(--green-border)] rounded-[10px] p-6",children:[e.jsxs("div",{className:"flex items-center gap-2 font-medium text-[14px] text-[var(--green)] mb-4",children:[e.jsx("span",{className:"w-[22px] h-[22px] rounded-full bg-[var(--green)] text-white flex items-center justify-center text-[12px] shrink-0",children:"✓"}),"Use a dendrogram when…"]}),e.jsx("ul",{className:"flex flex-col gap-[10px] list-none",children:["Presenting hierarchical clustering results","Showing evolutionary or phylogenetic relationships","Exploring natural groupings at multiple granularity levels","The merge distance is meaningful and worth encoding","You need to choose the number of clusters by visual inspection","Comparing similarity between items in a small-to-medium dataset"].map((t,r)=>e.jsx("li",{className:"text-[14px] text-[var(--ink)] leading-[1.5] pl-4 relative font-light before:content-['—'] before:absolute before:left-0 before:text-[var(--ink-faint)]",children:t},r))})]}),e.jsxs("div",{className:"bg-[var(--red-light)] border border-[var(--red-border)] rounded-[10px] p-6",children:[e.jsxs("div",{className:"flex items-center gap-2 font-medium text-[14px] text-[var(--red)] mb-4",children:[e.jsx("span",{className:"w-[22px] h-[22px] rounded-full bg-[var(--red)] text-white flex items-center justify-center text-[12px] shrink-0",children:"×"}),"Avoid a dendrogram when…"]}),e.jsx("ul",{className:"flex flex-col gap-[10px] list-none",children:["You have thousands of leaves — it becomes an unreadable wall","The distance metric is arbitrary or meaningless","You need non-hierarchical clusters — use k-means scatter plots instead","Your hierarchy doesn't have meaningful branch lengths — use a simple tree","The audience is unfamiliar with clustering — simpler charts tell the story faster","You only care about the final clusters, not the merge process"].map((t,r)=>e.jsx("li",{className:"text-[14px] text-[var(--ink)] leading-[1.5] pl-4 relative font-light before:content-['—'] before:absolute before:left-0 before:text-[var(--ink-faint)]",children:t},r))})]})]})]}),e.jsxs("section",{className:"py-14 border-b border-[var(--border-color)]",id:"how-to-read",children:[e.jsx("p",{className:"font-mono text-[10px] tracking-[0.14em] uppercase text-[var(--accent-color)] mb-3",children:"// 05 — Reading guide"}),e.jsx("h2",{className:"font-serif text-[28px] md:text-[30px] font-normal tracking-[-0.02em] text-[var(--ink)] mb-6 leading-[1.2]",children:"How to read a dendrogram"}),e.jsx("p",{className:"text-[16px] font-light text-[var(--ink)] leading-[1.75]",children:"Follow these steps whenever you encounter a dendrogram in the wild."}),e.jsx("div",{className:"flex flex-col gap-5 mt-7",children:[{num:"1",title:"Start at the leaves",desc:"Read the labels at the bottom — each leaf is an individual observation or item. Similar items will be close together."},{num:"2",title:"Read the vertical axis",desc:"The y-axis shows the distance or dissimilarity metric. Higher merge points mean the clusters being joined are more different from each other."},{num:"3",title:"Follow the merges upward",desc:"Each horizontal bar shows two branches merging into one cluster. The height of this bar tells you how dissimilar those two sub-clusters were."},{num:"4",title:"Look for large gaps",desc:"A big jump in merge height suggests a natural cluster boundary. Items below the jump are similar; items across the jump are different."},{num:"5",title:"Draw a cut line",desc:"Place a horizontal line at a chosen height. C
1ount how many vertical branches cross it — that's your number of clusters. Items within each branch form one cluster."}].map(t=>e.jsxs("div",{className:"flex gap-5 items-start bg-[var(--bg-card)] border border-[var(--border-color)] rounded-[10px] p-5",children:[e.jsx("span",{className:"font-serif text-[28px] text-[var(--accent-color)] leading-none mt-[2px] shrink-0 w-[28px]",children:t.num}),e.jsxs("div",{children:[e.jsx("p",{className:"text-[15px] font-medium text-[var(--ink)] mb-1",children:t.title}),e.jsx("p",{className:"text-[14px] text-[var(--ink-muted)] font-light leading-[1.6]",children:t.desc})]})]},t.num))})]}),e.jsxs("section",{className:"py-14 border-b border-[var(--border-color)]",id:"common-mistakes",children:[e.jsx("p",{className:"font-mono text-[10px] tracking-[0.14em] uppercase text-[var(--accent-color)] mb-3",children:"// 06 — Pitfalls"}),e.jsx("h2",{className:"font-serif text-[28px] md:text-[30px] font-normal tracking-[-0.02em] text-[var(--ink)] mb-6 leading-[1.2]",children:"Common mistakes"}),e.jsx("div",{className:"flex flex-col gap-5 mt-7",children:[{mistake:"Not reporting the linkage method",fix:"Single, complete, average, and Ward linkage produce very different dendrograms. Always state which method was used."},{mistake:"Ignoring the distance scale",fix:"Without a meaningful y-axis, readers can't interpret merge heights. Always include axis labels and units."},{mistake:"Over-interpreting leaf order",fix:"The left-right order of leaves is partially arbitrary — any two sibling branches can be swapped without changing the tree's meaning."},{mistake:"Too many leaves",fix:"With hundreds of leaves, individual labels become unreadable. Consider showing a truncated dendrogram or using a heatmap with dendrogram margins."},{mistake:"Using inappropriate distance metrics",fix:"Euclidean distance isn't always right — cosine similarity, correlation, or domain-specific distances may be more meaningful for your data."}].map((t,r)=>e.jsxs("div",{className:"bg-[var(--bg-card)] border border-[var(--border-color)] rounded-[10px] p-5 flex gap-4",children:[e.jsx("span",{className:"text-[var(--red)] text-[18px] shrink-0 mt-[2px]",children:"×"}),e.jsxs("div",{children:[e.jsx("p",{className:"text-[15px] font-medium text-[var(--ink)] mb-1",children:t.mistake}),e.jsx("p",{className:"text-[14px] text-[var(--ink-muted)] font-light leading-[1.6]",children:t.fix})]})]},r))})]}),e.jsxs("section",{className:"py-14 border-b border-[var(--border-color)]",id:"real-world-examples",children:[e.jsx("p",{className:"font-mono text-[10px] tracking-[0.14em] uppercase text-[var(--accent-color)] mb-3",children:"// 07 — In the wild"}),e.jsx("h2",{className:"font-serif text-[28px] md:text-[30px] font-normal tracking-[-0.02em] text-[var(--ink)] mb-6 leading-[1.2]",children:"Real-world examples"}),e.jsx("div",{className:"flex flex-col gap-5 mt-7",children:[{title:"Gene expression analysis",desc:"Bioinformaticians cluster genes by expression profiles, using dendrograms to identify co-regulated gene groups and functional categories."},{title:"Market segmentation",desc:"Marketers cluster customers by purchase behavior, using dendrogram branch heights to decide how many segments are meaningfully distinct."},{title:"Phylogenetic trees",desc:"Evolutionary biologists use dendrograms to show how species diverged over time, with branch lengths proportional to evolutionary distance."}].map((t,r)=>e.jsxs("div",{className:"bg-[var(--bg-card)] border border-[var(--border-color)] rounded-[10px] p-5",children:[e.jsx("p",{className:"text-[15px] font-medium text-[var(--ink)] mb-1",children:t.title}),e.jsx("p",{className:"text-[14px] text-[var(--ink-muted)] font-light leading-[1.6]",children:t.desc})]},r))})]}),e.jsxs("section",{className:"py-14 border-b border-[var(--border-color)]",id:"key-facts",children:[e.jsx("p",{className:"font-mono text-[10px] tracking-[0.14em] uppercase text-[var(--accent-color)] mb-3",children:"// 08 — Quick reference"}),e.jsx("h2",{className:"font-serif text-[28px] md:text-[30px] font-normal tracking-[-0.02em] text-[var(--ink)] mb-6 leading-[1.2]",children:"Key facts"}),e.jsx("div",{className:"grid grid-cols-1 sm:grid-cols-2 gap-4 mt-7",children:[{label:"Also known as",value:"Cluster tree, hierarchical clustering tree"},{label:"Data type",value:"Distance matrix or hierarchical clustering output"},{label:"Best for",value:"Clustering results, similarity analysis, phylogenetics"},{label:"Audience level",value:"Intermediate — common in scientific contexts"},{label:"Leaf limit",value:"~50–100 for readability"},{label:"Related to",value:"Tree diagram, heatmap with dendrogram, radial tree"}].map((t,r)=>e.jsxs("div",{className:"bg-[var(--bg-alt)] rounded-[6px] px-4 py-3",children:[e.jsx("p",{className:"font-mono text-[10px] tracking-[0.10em] uppercase text-[var(--ink-faint)] mb-1",children:t.label}),e.jsx("p",{className:"text-[14px] text-[var(--ink)] font-light",children:t.value})]},r))})]}),e.jsxs("section",{className:"py-14 border-b border-[var(--border-color)]",id:"variations",children:[e.jsx("p",{className:"font-mono text-[10px] tracking-[0.14em] uppercase text-[var(--accent-color)] mb-3",children:"// 09 — Variations"}),e.jsx("h2",{className:"font-serif text-[28px] md:text-[30px] font-normal tracking-[-0.02em] text-[var(--ink)] mb-6 leading-[1.2]",children:"Variations and extensions"}),e.jsx("div",{className:"flex flex-col gap-4 mt-7",children:[{name:"Clustered heatmap",desc:"A heatmap with dendrograms on the margins — rows and/or columns are reordered by cluster, making block patterns emerge."},{name:"Circular dendrogram",desc:"Leaves arranged in a circle with branches growing inward. Fits more leaves in less space and creates a visually striking display."},{name:"Tanglegram",desc:"Two dendrograms placed face-to-face with lines connecting matching leaves. Used to compare two different clustering solutions or evolutionary trees."}].map((t,r)=>e.jsxs("div",{className:"bg-[var(--bg-card)] border border-[var(--border-color)] rounded-[10px] p-5",children:[e.jsx("p",{className:"text-[15px] font-medium text-[var(--ink)] mb-1",children:t.name}),e.jsx("p",{className:"text-[14px] text-[var(--ink-muted)] font-light leading-[1.6]",children:t.desc})]},r))})]}),e.jsx(m,{faqs:i,sectionNumber:10}),e.jsxs("section",{className:"py-14",id:"related-charts",children:[e.jsx("p",{className:"font-mono text-[10px] tracking-[0.14em] uppercase text-[var(--accent-color)] mb-3",children:"// 11 — Related"}),e.jsx("h2",{className:"font-serif text-[28px] md:text-[30px] font-normal tracking-[-0.02em] text-[var(--ink)] mb-6 leading-[1.2]",children:"Related charts"}),e.jsx("div",{className:"grid grid-cols-1 sm:grid-cols-2 gap-4 mt-7",children:[{name:"Tree diagram",path:"/tree-diagram",desc:"A general hierarchy without distance-encoded branch lengths."},{name:"Radial tree",path:"/radial-tree",desc:"A circular tree layout — can accommodate more nodes in compact space."},{name:"Heatmap",path:"/heatmap",desc:"Often paired with dendrograms to 
1show clustered patterns in matrix data."},{name:"Scatter plot",path:"/scatter-plot",desc:"Use with k-means coloring when you want flat (non-hierarchical) cluster visualization."}].map((t,r)=>e.jsxs(s,{href:t.path,className:"bg-[var(--bg-card)] border border-[var(--border-color)] rounded-[10px] p-5 no-underline hover:border-[var(--accent-border-hover)] hover:-translate-y-[2px] hover:shadow-[var(--shadow-card)] transition-all duration-150 block",children:[e.jsx("p",{className:"text-[15px] font-medium text-[var(--ink)] mb-1",children:t.name}),e.jsx("p",{className:"text-[14px] text-[var(--ink-muted)] font-light leading-[1.6]",children:t.desc})]},r))})]})]}),e.jsxs("aside",{className:"hidden md:block sticky top-8",children:[e.jsxs("div",{className:"border border-[var(--border-color)] rounded-[10px] bg-[var(--bg-card)] p-5",children:[e.jsx("p",{className:"font-mono text-[10px] tracking-[0.14em] uppercase text-[var(--ink-faint)] mb-4",children:"On this page"}),e.jsx("div",{className:"flex flex-col gap-[10px]",children:g.map(({id:t,label:r})=>e.jsx("a",{href:`#${t}`,className:"text-[13px] text-[var(--ink-muted)] no-underline hover:text-[var(--accent-color)] transition-colors duration-150",children:r},t))})]}),e.jsxs("div",{className:"mt-6 border border-[var(--border-color)] rounded-[10px] bg-[var(--bg-card)] p-5",children:[e.jsx("p",{className:"font-mono text-[10px] tracking-[0.14em] uppercase text-[var(--ink-faint)] mb-4",children:"Related charts"}),e.jsx("div",{className:"flex flex-col gap-[10px]",children:[{name:"Tree diagram",path:"/tree-diagram"},{name:"Radial tree",path:"/radial-tree"},{name:"Heatmap",path:"/heatmap"}].map(({name:t,path:r})=>e.jsxs("span",{className:"text-[13px] text-[var(--ink-muted)] no-underline hover:text-[var(--accent-color)] transition-colors duration-150 cursor-pointer",children:[t," ",e.jsx("span",{children:"→"})]},r))})]})]})]})]}),e.jsxs("div",{className:"border-t border-[var(--border-color)] bg-[var(--bg-card)] px-6 md:px-12 py-5 flex items-center justify-between",children:[e.jsx("div",{className:"flex gap-8",children:e.jsxs(s,{href:"/tree-diagram",className:"text-[13px] text-[var(--ink-muted)] flex items-center gap-[6px] no-underline hover:text-[var(--ink)] transition-colors duration-150",children:[e.jsx("span",{className:"text-[var(--accent-color)]",children:"←"})," Previous: Tree diagram"]})}),e.jsx("span",{className:"font-mono text-[11px] text-[var(--ink-faint)] hidden md:block",children:"Hierarchy charts"}),e.jsx("div",{className:"flex gap-8",children:e.jsxs(s,{href:"/radial-tree",className:"text-[13px] text-[var(--ink-muted)] flex items-center gap-[6px] no-underline hover:text-[var(--ink)] transition-colors duration-150",children:["Next: Radial tree ",e.jsx("span",{className:"text-[var(--accent-color)]",children:"→"})]})})]})]})}export{y as default};

Line numbers count LF bytes from the start of the resource, as the search results do. Vendor segments are library code the classifier recognised; they are stored but not indexed. Bytes are shown as Latin1 characters, one per byte.