using color to communicate, not to decorate leroy ......see the paper for: • color naming systems...

66
Using Color to Communicate, Not to Decorate LeRoy Bessler PhD DentaQuest Visual Data Insights™ [email protected] SAS is a registered trademark or trademark of SAS Institute Inc. in the USA and other countries. ® indicates USA registration. Other product and brand names are trademarks or registered trademarks of their respective owners. Visual Data Insights is a trademark of LeRoy Bessler PhD.

Upload: others

Post on 20-Aug-2020

2 views

Category:

Documents


0 download

TRANSCRIPT

Page 1: Using Color to Communicate, Not to Decorate LeRoy ......See the Paper for: • Color Naming Systems • Color Samples • Code to generate large number of samples – colors – text-background

Using Color to Communicate,Not to Decorate

LeRoy Bessler PhDDentaQuestVisual Data Insights™[email protected]

SAS is a registered trademark or trademark of SAS Institute Inc. in the USA and other countries. ® indicates USA registration. Other product and brand names are trademarks or registered trademarks of their respective owners.Visual Data Insights is a trademark of LeRoy Bessler PhD.

Page 2: Using Color to Communicate, Not to Decorate LeRoy ......See the Paper for: • Color Naming Systems • Color Samples • Code to generate large number of samples – colors – text-background

Too many to list.See my “Principia Color” tip sheetin the Proceedings Addenda Section

Key Take-Aways

Page 3: Using Color to Communicate, Not to Decorate LeRoy ......See the Paper for: • Color Naming Systems • Color Samples • Code to generate large number of samples – colors – text-background

• image + precise numbers =quick, easy inference + reliable inference

• ODS SGPLOT VLINE Overlay Color Chart

My Favorite Multi-line Plot Solution

Page 4: Using Color to Communicate, Not to Decorate LeRoy ......See the Paper for: • Color Naming Systems • Color Samples • Code to generate large number of samples – colors – text-background

• Eliminates any need for a legend• A Magnificent SolutionCode to create a similar result is at:http://www.lexjansen.com/mwsug/2012/DV/MWSUG-2012-DV13.pdf

My Favorite Multi-line Plot Solution

Page 5: Using Color to Communicate, Not to Decorate LeRoy ......See the Paper for: • Color Naming Systems • Color Samples • Code to generate large number of samples – colors – text-background
Page 6: Using Color to Communicate, Not to Decorate LeRoy ......See the Paper for: • Color Naming Systems • Color Samples • Code to generate large number of samples – colors – text-background

S & P Index By Month 1988 to 1991

Page 7: Using Color to Communicate, Not to Decorate LeRoy ......See the Paper for: • Color Naming Systems • Color Samples • Code to generate large number of samples – colors – text-background

Access to Color ExcessAll the ways to color a PROC PRINT table.SAS code isin the paper. Capabilities also for PROCTABULATE and REPORT.No use PROC TEMPLATE.

Page 8: Using Color to Communicate, Not to Decorate LeRoy ......See the Paper for: • Color Naming Systems • Color Samples • Code to generate large number of samples – colors – text-background
Page 9: Using Color to Communicate, Not to Decorate LeRoy ......See the Paper for: • Color Naming Systems • Color Samples • Code to generate large number of samples – colors – text-background

Let me be yourSAS Color Therapist

Page 10: Using Color to Communicate, Not to Decorate LeRoy ......See the Paper for: • Color Naming Systems • Color Samples • Code to generate large number of samples – colors – text-background

Use Colorto Communicate

Page 11: Using Color to Communicate, Not to Decorate LeRoy ......See the Paper for: • Color Naming Systems • Color Samples • Code to generate large number of samples – colors – text-background

When you evaluate the color distinguishability on these slides—In slides, color distinguishability isbetter than when graphs are printed.• Projection magnifies the color areas.• Printed color does not shine

like monitor color.

Page 12: Using Color to Communicate, Not to Decorate LeRoy ......See the Paper for: • Color Naming Systems • Color Samples • Code to generate large number of samples – colors – text-background

Assure colors are distinguishableDifficult/Impossible to distinguish:• thin lines• thin or tiny text• very small plot markers• very small legend samples

Page 13: Using Color to Communicate, Not to Decorate LeRoy ......See the Paper for: • Color Naming Systems • Color Samples • Code to generate large number of samples – colors – text-background

Typical Uses of Color in IT• Color coding (legends, traffic lighting*, etc.)• Emphasis• Decoration* “traffic lighting” is a communication problem for some viewers—details later

Page 14: Using Color to Communicate, Not to Decorate LeRoy ......See the Paper for: • Color Naming Systems • Color Samples • Code to generate large number of samples – colors – text-background

Common Bad Uses of Color in IT• Textured Backgrounds• Color Gradient Backgrounds• Image Backgrounds

ALL impair the readability of foreground text,and add ZERO communication value

Page 15: Using Color to Communicate, Not to Decorate LeRoy ......See the Paper for: • Color Naming Systems • Color Samples • Code to generate large number of samples – colors – text-background

Common Bad Uses of Color in IT• legend using a color gradient

rather than discrete colors• human eye can reliably distinguish only five

shades of the same hue,plus black and white

Page 16: Using Color to Communicate, Not to Decorate LeRoy ......See the Paper for: • Color Naming Systems • Color Samples • Code to generate large number of samples – colors – text-background

Emphasis Options for Colorless Text• Bold• Italics• Underline (if not a web context)• (used sparingly) ALL CAPS

Page 17: Using Color to Communicate, Not to Decorate LeRoy ......See the Paper for: • Color Naming Systems • Color Samples • Code to generate large number of samples – colors – text-background

A PopularColor Communication Failure

Page 18: Using Color to Communicate, Not to Decorate LeRoy ......See the Paper for: • Color Naming Systems • Color Samples • Code to generate large number of samples – colors – text-background
Page 19: Using Color to Communicate, Not to Decorate LeRoy ......See the Paper for: • Color Naming Systems • Color Samples • Code to generate large number of samples – colors – text-background

Commonest Color Blindness:Red = Green

Page 20: Using Color to Communicate, Not to Decorate LeRoy ......See the Paper for: • Color Naming Systems • Color Samples • Code to generate large number of samples – colors – text-background
Page 21: Using Color to Communicate, Not to Decorate LeRoy ......See the Paper for: • Color Naming Systems • Color Samples • Code to generate large number of samples – colors – text-background

Alternative to “Traffic Lighting”

NOTE: Use light shades of red and blue with black text. Full strength OK with white text.SAS code is in the paper.

Page 22: Using Color to Communicate, Not to Decorate LeRoy ......See the Paper for: • Color Naming Systems • Color Samples • Code to generate large number of samples – colors – text-background

Pop. Density (per sq. km.) Change in Counties of Republic of Ireland, 1901‐1996Highlighted Spatial Population Table of County Name, Density Change, & 1996 Density

An Alternative to Traffic Lighting: augmented with light shades of the signal colors.

Page 23: Using Color to Communicate, Not to Decorate LeRoy ......See the Paper for: • Color Naming Systems • Color Samples • Code to generate large number of samples – colors – text-background

Pop. Density (per sq. km.) Change in Counties of Republic of Ireland, 1901‐1996Highlighted Spatial Population Table of County Name, Density Change, & 1996 Density

Page 24: Using Color to Communicate, Not to Decorate LeRoy ......See the Paper for: • Color Naming Systems • Color Samples • Code to generate large number of samples – colors – text-background

Color ReadabilityColor Distinguishability

Page 25: Using Color to Communicate, Not to Decorate LeRoy ......See the Paper for: • Color Naming Systems • Color Samples • Code to generate large number of samples – colors – text-background

Make Colored Text Thicker• this is black Arial text• this is red Arial text• this is bold red Arial text

Page 26: Using Color to Communicate, Not to Decorate LeRoy ......See the Paper for: • Color Naming Systems • Color Samples • Code to generate large number of samples – colors – text-background

Dots at 28 pt, 28 pt bold, 56 pt bold.   . . . .   . . . . ..   . . . .   . . . . .

.   . . . .   .. . . .

.   . . . .   . . . . .

.   . . . .   . . . . .

.   . . . .   .. . . .

Page 27: Using Color to Communicate, Not to Decorate LeRoy ......See the Paper for: • Color Naming Systems • Color Samples • Code to generate large number of samples – colors – text-background

Compare Readabilitywhite grey blackyellow orange red magentagreencyan blue medium blue dark blue

Page 28: Using Color to Communicate, Not to Decorate LeRoy ......See the Paper for: • Color Naming Systems • Color Samples • Code to generate large number of samples – colors – text-background

Compare Readabilitywhite grey blackyellow orange red magentagreencyan blue medium blue dark blue

Page 29: Using Color to Communicate, Not to Decorate LeRoy ......See the Paper for: • Color Naming Systems • Color Samples • Code to generate large number of samples – colors – text-background

Five-Cluster Distribution of 532 VIEWS Members by County in 1999

1-1014-2429-3043-49

61

human eye cannot reliably distinguish more than fives shades of one hue

Page 30: Using Color to Communicate, Not to Decorate LeRoy ......See the Paper for: • Color Naming Systems • Color Samples • Code to generate large number of samples – colors – text-background

Use Color to Communicate, Not to Decorate• If your graph does not require color (e.g.,

for a legend to be able to distinguish different plot lines, pie slices, or bars),best color combination is black & white

• If not using white, try yellow.• If you don’t like yellow, try cream

Page 31: Using Color to Communicate, Not to Decorate LeRoy ......See the Paper for: • Color Naming Systems • Color Samples • Code to generate large number of samples – colors – text-background

Use Color to Communicate, Not to Decorate• It’s not an accident that books & newspapers

are printed black on white

Page 32: Using Color to Communicate, Not to Decorate LeRoy ......See the Paper for: • Color Naming Systems • Color Samples • Code to generate large number of samples – colors – text-background

Color Use

necessary

harmless

confusing

Page 33: Using Color to Communicate, Not to Decorate LeRoy ......See the Paper for: • Color Naming Systems • Color Samples • Code to generate large number of samples – colors – text-background

What do the same color bars have in common?

Page 34: Using Color to Communicate, Not to Decorate LeRoy ......See the Paper for: • Color Naming Systems • Color Samples • Code to generate large number of samples – colors – text-background

When to Use Color• No data levels or categories:

black & white• Few levels or categories:

gray shades maybe• Many levels or categories:

color necessary

Page 35: Using Color to Communicate, Not to Decorate LeRoy ......See the Paper for: • Color Naming Systems • Color Samples • Code to generate large number of samples – colors – text-background

Benefits of “Boring” Black & White• Faster, cheaper, more reliable• Easier to use

– simpler equipment– no agonizing over color strategy

• More copyable(more, cheaper, faster copiers):Useful Documents Get Copied

Page 36: Using Color to Communicate, Not to Decorate LeRoy ......See the Paper for: • Color Naming Systems • Color Samples • Code to generate large number of samples – colors – text-background
Page 37: Using Color to Communicate, Not to Decorate LeRoy ......See the Paper for: • Color Naming Systems • Color Samples • Code to generate large number of samples – colors – text-background
Page 38: Using Color to Communicate, Not to Decorate LeRoy ......See the Paper for: • Color Naming Systems • Color Samples • Code to generate large number of samples – colors – text-background
Page 39: Using Color to Communicate, Not to Decorate LeRoy ......See the Paper for: • Color Naming Systems • Color Samples • Code to generate large number of samples – colors – text-background
Page 40: Using Color to Communicate, Not to Decorate LeRoy ......See the Paper for: • Color Naming Systems • Color Samples • Code to generate large number of samples – colors – text-background

Michael Turton on Color:• works better with space around it• prioritizes information,

whether meant to or not• can guide the viewer

Page 41: Using Color to Communicate, Not to Decorate LeRoy ......See the Paper for: • Color Naming Systems • Color Samples • Code to generate large number of samples – colors – text-background

How or whether to use color:What purpose does this color serve?

Page 42: Using Color to Communicate, Not to Decorate LeRoy ......See the Paper for: • Color Naming Systems • Color Samples • Code to generate large number of samples – colors – text-background

How or whether to use color:Unless for a legend* or color coding,the best color combinationis ALWAYS black & white.*When doing a multi-line plot without an on-chart y-value table, it isadequately rendered in black & white with differently shaped plot symbols.

Page 43: Using Color to Communicate, Not to Decorate LeRoy ......See the Paper for: • Color Naming Systems • Color Samples • Code to generate large number of samples – colors – text-background

All About Legends

Page 44: Using Color to Communicate, Not to Decorate LeRoy ......See the Paper for: • Color Naming Systems • Color Samples • Code to generate large number of samples – colors – text-background

Legend Sample Size DefectsSample Sizes Too Small—Difficult or Impossible to distinguish:• Excel Example: pie chart legend

Page 45: Using Color to Communicate, Not to Decorate LeRoy ......See the Paper for: • Color Naming Systems • Color Samples • Code to generate large number of samples – colors – text-background

Anti-Communicative Excel Pie ChartIn a Word Document or Printed,unusable legend: BrandB or BrandE?

Figure 7: Excel Pie Chart With Legend.Legend Color Samples Are Too Small.

5%20%

5%

11%19%

40%

BrandABrandBBrandCBrandDBrandEBrandF

Page 46: Using Color to Communicate, Not to Decorate LeRoy ......See the Paper for: • Color Naming Systems • Color Samples • Code to generate large number of samples – colors – text-background

Anti-Communicative Excel Pie ChartExcel does not supportadjustment of size of legend colors

Figure 7: Excel Pie Chart With Legend.Legend Color Samples Are Too Small.

5%20%

5%

11%19%

40%

BrandABrandBBrandCBrandDBrandEBrandF

Page 47: Using Color to Communicate, Not to Decorate LeRoy ......See the Paper for: • Color Naming Systems • Color Samples • Code to generate large number of samples – colors – text-background

Communicative-Effective Pie ChartWith Legend, Made With SAS/GRAPH

For code similar to that used for above, see:http://support.sas.com/resources/papers/proceedings12/235-2012.pdf

Page 48: Using Color to Communicate, Not to Decorate LeRoy ......See the Paper for: • Color Naming Systems • Color Samples • Code to generate large number of samples – colors – text-background

► ODS Graphics Pie Chart with Legend (or Labels) requires Graph Template Language► See my SAS Global Forum 2014 paper for what an ordeal this can be—if you are fussy about design

Page 49: Using Color to Communicate, Not to Decorate LeRoy ......See the Paper for: • Color Naming Systems • Color Samples • Code to generate large number of samples – colors – text-background

Legend Sample Size ControlSAS/GRAPH vs. ODS Graphics

• SAS/GRAPH – absolute control of size• ODS Graphics:

– pre-Version-9.4 bar chart legend fails– V9.4 AUTOITEMSIZE option of the

KEYLEGEND statement fixes problem• AUTOITEMSIZE sets color sample size

to match the font size of the description

Page 50: Using Color to Communicate, Not to Decorate LeRoy ......See the Paper for: • Color Naming Systems • Color Samples • Code to generate large number of samples – colors – text-background

V9.3 ODS Graphics – Tiny Legend Samples

Page 51: Using Color to Communicate, Not to Decorate LeRoy ......See the Paper for: • Color Naming Systems • Color Samples • Code to generate large number of samples – colors – text-background

V9.3 SAS/GRAPH - Successful Legend

Page 52: Using Color to Communicate, Not to Decorate LeRoy ......See the Paper for: • Color Naming Systems • Color Samples • Code to generate large number of samples – colors – text-background

V9.4 ODS Graphics without AUTOITEMSIZE

Page 53: Using Color to Communicate, Not to Decorate LeRoy ......See the Paper for: • Color Naming Systems • Color Samples • Code to generate large number of samples – colors – text-background

V9.4 ODS Graphics with AUTOITEMSIZE

Page 54: Using Color to Communicate, Not to Decorate LeRoy ......See the Paper for: • Color Naming Systems • Color Samples • Code to generate large number of samples – colors – text-background

Bar Chart Legend Sample SizeUpdate for ODS Graphics

V9.4 TS1M3, expected in July 2015,provides excellent controls:• SCALE – Scale color swatch by a factor• FILLHEIGHT –height of color swatch• FILLASPECT –aspect ratio of color swatch

(including “Golden”)

Page 55: Using Color to Communicate, Not to Decorate LeRoy ......See the Paper for: • Color Naming Systems • Color Samples • Code to generate large number of samples – colors – text-background

“3D” bars, legend colors ambiguous to my eye

Page 56: Using Color to Communicate, Not to Decorate LeRoy ......See the Paper for: • Color Naming Systems • Color Samples • Code to generate large number of samples – colors – text-background

Only 2D bars, but legend colors unambiguous

Page 57: Using Color to Communicate, Not to Decorate LeRoy ......See the Paper for: • Color Naming Systems • Color Samples • Code to generate large number of samples – colors – text-background

• For line charts and point (scatter) charts,ODS Graphics has size controlsfor line thickness & marker/symbol size—No Problem

ODS Graphics Plot Legends OK

Page 58: Using Color to Communicate, Not to Decorate LeRoy ......See the Paper for: • Color Naming Systems • Color Samples • Code to generate large number of samples – colors – text-background

Usable ODS Graphics Plot Legend

Page 59: Using Color to Communicate, Not to Decorate LeRoy ......See the Paper for: • Color Naming Systems • Color Samples • Code to generate large number of samples – colors – text-background

• Image for quick, easy inference• Precise Numbers for reliable inference• No Need for a Legend• Color-coded, color-coordinated

plot with on-chart table = LegendA Magnificent SolutionCode to create a similar result is at:http://www.lexjansen.com/mwsug/2012/DV/MWSUG-2012-DV13.pdf

My Favorite Multi-line Plot Solution

Page 60: Using Color to Communicate, Not to Decorate LeRoy ......See the Paper for: • Color Naming Systems • Color Samples • Code to generate large number of samples – colors – text-background

S & P Index By Month 1988 to 1991

Page 61: Using Color to Communicate, Not to Decorate LeRoy ......See the Paper for: • Color Naming Systems • Color Samples • Code to generate large number of samples – colors – text-background

Too many to list.See my “Principia Color” tip sheetin the Proceedings Addenda Section

Key Take-Aways

Page 62: Using Color to Communicate, Not to Decorate LeRoy ......See the Paper for: • Color Naming Systems • Color Samples • Code to generate large number of samples – colors – text-background

See the Paper for:• Color Naming Systems• Color Samples• Code to generate large number of samples

– colors– text-background color combinations

• Brief discussion of transparent colors andreferences for more & better informationabout them

Page 63: Using Color to Communicate, Not to Decorate LeRoy ......See the Paper for: • Color Naming Systems • Color Samples • Code to generate large number of samples – colors – text-background

Your questions, comments, and ideas about communicating with color are always welcome:

LeRoy Bessler PhDMequon, Wisconsin, USA Visual Data Insights™[email protected]

Visual Data Insights is a trademark of LeRoy Bessler PhD.

Page 64: Using Color to Communicate, Not to Decorate LeRoy ......See the Paper for: • Color Naming Systems • Color Samples • Code to generate large number of samples – colors – text-background

Do You See What I See (or Saw)?• Differences in human perception:

She sees brown. He sees green.Notice how hard it is to assessthe color of that thin text?

• Here is a solid block of it:

Page 65: Using Color to Communicate, Not to Decorate LeRoy ......See the Paper for: • Color Naming Systems • Color Samples • Code to generate large number of samples – colors – text-background

Color Variance Due To Technology• Monitor uses RGB colors, Printer uses CMYK• Also, “transmitted” color vs. reflected color• Monitor vs. Projector• Desktop vs. Laptop Monitor• LED vs. CRT Projector• Projectors require color tuning• PC color vs. Mac color

Page 66: Using Color to Communicate, Not to Decorate LeRoy ......See the Paper for: • Color Naming Systems • Color Samples • Code to generate large number of samples – colors – text-background

Beware of SAS Color Names

Above example used an earlier version of SAS.In V9.4, C=LightPink yields a lighter color than that above, but STILL darker than C=Pink.