Python Review
Iteration Start Stop Increment Number for x in sequence: print x Start: x = sequence[0] Stop: x = sequence[len(sequence) – 1] Increment: values in sequence Number: len(sequence)
Iteration Start Stop Increment Number for x in range(10): print x Start: x = 0 Stop: x = 9 Increment: 1 Number: 10
Iteration Start Stop Increment Number for x in range(0, 12, 2): print x range(0, 12, 2) [0, 2, 4, 6, 8, 10] Start: x = 0 Stop: x = 10 Increment: 2 Number: 6
Iteration Start Stop Increment Number x = 0 while x <= 10: print x x = x + 2 Start: x = 0 Stop: x > 10 Increment: 2 Number: 6
Iteration x = 0 x = 0 while x <= 10: while x <= 10: print x Go Forever 2 4 6 8 10 12 x = 0 while x <= 10: x = x + 2 print x while x <= 10: x = 0 print x x = x + 2 All Zeros
Color in Visualization CMSC 120: Visualizing Information Lecture 4/24/08
Multivariate Visualization 3 or more dimensions hard to visualize Projection into lower-d space distorts data Multifunctioning Graphical Elements
Color Pre-attentive 1000s of different colors 20-30 gray tones Patterns, boundaries, movement
Color Purposes Emphasis Appeal Dimensionality Hello, here is some text. Can you read what it says? Hello, here is some text. Can you read what it says? Hello, here is some text. Can you read what it says? Hello, here is some text. Can you read what it says? Hello, here is some text. Can you read what it says? Hello, here is some text. Can you read what it says?
Color
Color The quality of an object with respect to the light reflected by the object Determined visually by: Hue: color Saturation: purity Brightness: % black
Color
Types of Colors Additive Colors Subtractive All visible colors are a sum of two or more Primary Colors Red, Green, Blue Subtractive Complementary Colors Removing an additive color from white light
Representing Color Encoding RGB CMKY = 1 - RGB
Choosing the Right Color Human matches 16-20 colors Addition of pattern elements < 10 -12 > 20 can no longer be pre-attentively processed VGA Monitor 16 colors 262,144 (643) Super VGA 256 colors Several million How much and which colors?
Color Schemes
Color Schemes Color may carry standardized meanings in particular applications. blue = water bodies green = vegetation brown = desert/mountains white = ice or snow, etc. Color maps
2004 Election
Tornado
Elevational map of Kansas Similar colors: subclasses Dissimilar: barriers/unrelated
Complementary Colors Opposites on the color wheel High Contrast Vibrant (full saturation) Can be jarring Make something stand out Bad for text
Analogous Colors Adjacent on Color Wheel Serene Comfortable Found in Nature Pleasing Contrast can be problematic Use black, white, gray as an accent
Analogous Colors Adjacent on Color Wheel Serene Comfortable Found in Nature Pleasing Contrast can be problematic Use black, white, gray as an accent
Triadic Colors Evenly spaced Vibrant, even when pale hues are used Balance color use One dominate Others accent
Warm and CoolColors Cool colors Hot colors Short wave length violet, blue, cyan, green large regions features for which no special emphasis is desired Hot colors Long wavelength yellow, orange, red, magenta (long wavelength). Best used for small regions features for which special emphasis is desired
Hot and Cool Colors Color Stereoscopic Effect cool colors appear farther away hot colors appear closer. enhanced by using black boundaries between color areas, a small contour interval, and bright high-saturation or fluorescent