-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathbokeh.yaml
More file actions
208 lines (208 loc) · 6.54 KB
/
bokeh.yaml
File metadata and controls
208 lines (208 loc) · 6.54 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
library: bokeh
specification_id: dendrogram-basic
created: '2025-12-23T10:01:43Z'
updated: '2026-04-05T20:00:00+00:00'
generated_by: claude-opus-4-6
workflow_run: 20457532402
issue: 0
python_version: '3.14.3'
library_version: 3.8.2
preview_url: https://storage.googleapis.com/pyplots-images/plots/dendrogram-basic/bokeh/plot.png
preview_html: https://storage.googleapis.com/pyplots-images/plots/dendrogram-basic/bokeh/plot.html
quality_score: null
impl_tags:
dependencies:
- scipy
techniques:
- html-export
patterns:
- data-generation
- iteration-over-groups
dataprep:
- hierarchical-clustering
styling: []
review:
strengths:
- Excellent manual implementation of dendrogram structure using Bokeh primitives
(line glyphs)
- Two-color scheme effectively distinguishes cluster levels with colorblind-safe
palette
- Biologically accurate iris data clustering with proper species separation
- Clean KISS code structure with proper seed for reproducibility
- Rotated labels prevent overlap and maintain readability
- Generates both PNG and interactive HTML output leveraging Bokeh web capabilities
weaknesses:
- X-axis label Sample is generic; could be more descriptive like Iris Samples
- No legend or annotation explaining the blue/yellow color threshold meaning
- Could use ColumnDataSource for more idiomatic Bokeh code
image_description: 'The plot displays a hierarchical dendrogram visualizing clustering
of 15 iris flower samples across three species (Setosa, Versicolor, Virginica).
The tree structure uses a two-color scheme: blue (#306998) for high-level merges
above the color threshold and yellow/gold (#FFD43B) for lower-level within-cluster
merges. The Y-axis shows "Distance (Ward)" ranging from 0 to approximately 10,
with dashed grid lines. The X-axis is labeled "Sample" with 15 rotated labels
(45°) showing sample names like "Setosa-1", "Versicolor-4", "Virginica-3", etc.
The title "dendrogram-basic · bokeh · pyplots.ai" appears at the top left. The
dendrogram correctly shows Setosa samples clustering separately on the left, while
Versicolor and Virginica samples intermix on the right before merging at a higher
distance level - biologically accurate for iris data.'
criteria_checklist:
visual_quality:
score: 36
max: 40
items:
- id: VQ-01
name: Text Legibility
score: 9
max: 10
passed: true
comment: Title, axis labels, and tick labels are readable; rotated sample
labels are slightly small but legible
- id: VQ-02
name: No Overlap
score: 8
max: 8
passed: true
comment: No overlapping text elements; rotated labels fit well
- id: VQ-03
name: Element Visibility
score: 8
max: 8
passed: true
comment: Line width of 4 makes dendrogram branches clearly visible
- id: VQ-04
name: Color Accessibility
score: 5
max: 5
passed: true
comment: Blue and yellow provide excellent contrast and are colorblind-safe
- id: VQ-05
name: Layout Balance
score: 4
max: 5
passed: true
comment: Good proportions, slight extra whitespace on right side
- id: VQ-06
name: Axis Labels
score: 1
max: 2
passed: true
comment: '"Distance (Ward)" is descriptive but "Sample" is generic'
- id: VQ-07
name: Grid & Legend
score: 1
max: 2
passed: true
comment: Dashed grid is subtle (alpha 0.3), no legend needed but color meaning
unexplained
spec_compliance:
score: 25
max: 25
items:
- id: SC-01
name: Plot Type
score: 8
max: 8
passed: true
comment: Correct dendrogram/tree visualization
- id: SC-02
name: Data Mapping
score: 5
max: 5
passed: true
comment: Samples on X-axis, merge distances on Y-axis
- id: SC-03
name: Required Features
score: 5
max: 5
passed: true
comment: Hierarchical structure, branch heights proportional to merge distances,
labels present
- id: SC-04
name: Data Range
score: 3
max: 3
passed: true
comment: Y-axis shows full range from 0 to max distance
- id: SC-05
name: Legend Accuracy
score: 2
max: 2
passed: true
comment: No legend required for this plot type
- id: SC-06
name: Title Format
score: 2
max: 2
passed: true
comment: Uses correct format "dendrogram-basic · bokeh · pyplots.ai"
data_quality:
score: 18
max: 20
items:
- id: DQ-01
name: Feature Coverage
score: 7
max: 8
passed: true
comment: Shows hierarchical merging at multiple levels, cluster separation
visible; could show more diversity in merge distances
- id: DQ-02
name: Realistic Context
score: 7
max: 7
passed: true
comment: Iris flower species is a classic, real-world clustering example
- id: DQ-03
name: Appropriate Scale
score: 4
max: 5
passed: true
comment: 15 samples is within recommended 10-50 range; Ward distances are
realistic
code_quality:
score: 9
max: 10
items:
- id: CQ-01
name: KISS Structure
score: 3
max: 3
passed: true
comment: 'Linear script: imports → data → linkage → plot → save'
- id: CQ-02
name: Reproducibility
score: 3
max: 3
passed: true
comment: np.random.seed(42) set
- id: CQ-03
name: Clean Imports
score: 2
max: 2
passed: true
comment: All imports are used
- id: CQ-04
name: No Deprecated API
score: 1
max: 1
passed: true
comment: Uses current Bokeh API
- id: CQ-05
name: Output Correct
score: 0
max: 1
passed: false
comment: Saves both plot.png and plot.html (minor issue, but PNG is correct)
library_features:
score: 3
max: 5
items:
- id: LF-01
name: Uses distinctive library features
score: 3
max: 5
passed: true
comment: Manual rendering with Bokeh figure and line glyphs; generates HTML
output for interactivity; however, could use ColumnDataSource pattern more
verdict: APPROVED