- Assignment 3 due tonight
- Were videos helpful?
- Questions
- Design Principles, color, edges
Quiz: What are the primary colors?
- red, green, blue
- red, yellow, blue
- orange, green, violet
- cyan, magenta, yellow
September 13, 2022
Honesty + Good Judgment
Healy, K. (2018). Data visualization: a practical introduction. Princeton University Press.
Good aesthetics (as opposed to bad taste) is hard to operationalize, but here are some general guidelines (that might be broken at times):
You want to ensure that your visualizations are beautiful, easy to read and interpret, and memorable (i.e., visually distinctive) – these goals might conflict with each other at times and only practice will tell you how to balance all of these elements.
General issues to avoid:
Discuss with a partner: What principles does this violate?
Discuss with a partner: What principles does this violate?
Discuss with a partner: What principles is this respecting?
Our visual system (i.e., all the visual processing models from our eyes to our brain) re-constructs what we are looking at and it uses relative differences instead of absolute values for brightness and colors.
Relativization of brightness can be demonstrated in the Herman grid effect, in which we perceive darker blobs where grid lines meet at the edge of our visual field.
Write D3 code to draw a 4 x 4 grid of rectangles
Ware, C. (2008). Visual Thinking: For Design (Series in Interactive Technologies). Morgan Kaufmann Publishers.
Another side effect of our visual system processing is perceiving the same shade as lighter or darker depending on the background behind shade.
Write D3 code to draw a 2 x 2 grid of rectangles
Things to keep in mind regarding edges, colors, and contrasts:
Quiz: What are the primary colors?
Quiz: What are the primary colors
“Color” refers to three components:
Ways to represent color in HTML:
.attr("fill", "red") // name .attr("fill", "#FF0000") // #RRGGBB .attr("fill", "rgb(255,0,0)") // rgb(R,G,B) .attr("fill", "rgb(100%,0%,0%)") // rgb(R%,G%,B%) .attr("fill", "rgba(100%,0%,0%,0.5)") // works with both int and % .attr("fill", "hsl(0,100%,50%)") // hsl(H,S%,L%) .attr("fill", "hsla(0,100%,50%,0.5)") // hsla(H,S%,L%,a)
Download sample code and make changes to it
You can use online color pickers for color help.
Here are some points to consider:
Let’s look at the following arrays of colors:
d3.schemeCategory10; d3.schemeAccent; d3.schemeBrBG[6];
For continuous colors schemes (with values between 0 and 1):
d3.interpolateBrBG(0); d3.interpolateBrBG(0.5);