Challenge 3 | csci0465-f22 | Observable
ojs
ojs
Author
Prateek Wadhavkar
@pwad1
Comments (4)
Christopher Andrews
Dec 5, 2022
The colors are different because the iris data doesn't include "cluster" as variable so your color scale's domain is invalid.
Dec 5, 2022
Your life would have been easier if you had just passed this function a g and attached the graph to the g rather than returning a distinct svg that then had to be incorporated into the master svg.
Reply
Christopher Andrews
Dec 5, 2022
A loop would have been a far superior solution to listing out each sub graph individually.
Dec 5, 2022
JavaScript's template strings would be better than converting things to strings and appending them together.
https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Template_literals
Reply
Add comment
Subscribe to notifications
© 2026 Observable, Inc.
Terms of service
Privacy policy
Product
About
Pricing
Documentation
Release notes
Contact us
Open source
Notebook Kit
Plot
D3
Community
Explore
Forum
Bluesky
YouTube
X
0
Follow
Follow
Challenge 3 | csci0465-f22 | Observable