Sunday, November 25, 2012

Visual Examples: Combining Clip art with pictures

It is been a while since I have posted new visual examples. I'm thrilled about this one: not all pieces of clip art are created equal. The guys at Yiibu have done a great job combining clip art and pictures in a very interesting presentation. Enjoy!

Tuesday, November 6, 2012

Minitutorial: Creating a title slide from a portrait image

Back in January I promised I would do a tutorial on how to turn a portrait image into a full side slide. Well I can't start a series on tables without first doing that tutorial. Let's get started.

The "problem" is simple, you have an image with the right height of a slide, the the width is not enough. In the case of a 1024 × 768 slide, some images come in the 512 × 768 size, so what to do with the other half? Case in point,
Figure 1: Original portrait image.
I would like to use this image taken from Wikimedia commons, but what to do with the other half? The result that I what to go is this
Figure 2: turning Figure 1 into a full side slide
With would give me white space and a sense of continuity that I really like. SO that's what we are going to do,  makeover Figure 1 into Figure 2.  The trick is simple, (1) we crop some pixels from Figure's 1 right border,  (2) stretch it to cover the rest of slide, and (3) blur it.  There is pre-processing and some pos-processing however. 
1. Open the original image in the Gimp or Photoshop and resize the canvas (Image menu -> Scale Image)  to have the same width of the slide. I have already done this in Figure 1. 
Figure 3. Selection of 20 pixels on the right border
2. Make a rectangular selection of approximately 20 pixels (see Figure 3)
3. Open the Layer dialog (Ctrl-L)
4. Copy the selection (Ctrl-C)
5. Paste it into a new transparent layer by clicking on the left-most button on the bottom of the Layer Dialog.
6. Move to the layer you just created and stretch that selection (Layer Menu -> Scale Layer) to 532 pixels (see Figure  4). 532 = 1024 - 512 + 20. 1024 is the slide's width, 512 is the image's width, and 20 the width of the selection.
Figure 4, Stretching the border selection
 7. Now move the stretched selection all the way to the right, so that the slide's right border and the stretched image's right border are the same.
8. Blur "step 7" (Filter Menu -> Gaussian Blur) by 10 pixels.
There you go! You have arrived at the result.

One more thing

Let's examine the interface between the original image and the stretched and blurred one.
As you can the change between the two images is abrupt. We can soften it to get a nice continuity, something like this
For that purpose you need to add a layer mask to the stretched image. The figure below shows this mask
If you compare it with Figure 4, you would see that the black-to-white gradient is located at the same place of the original border selection.




Saturday, November 3, 2012

"What are the important numbers here?" — How to improve tables. Part 1

The presentation of data in tables is a usual practice in scientific talks. Sadly, most tables are ineffective. In this first installment, I give an example of before and after table design. 

Writing about tables is something I wanted to do for long time, after all quantitative data is at the heart of science and its communication. Tables are ubiquitous, and if you are like me, you learned how to design them by imitation. The problem is, most tables suck, as illustrated in this quote
Getting information from a table is like extracting sunlight from a cucumber.
— Farquhar & Farquhar, 1891
By the way, I got this quote from Wainer, H. (1992). Understanding graphs and tables. Educational Researcher, 21, 14-23, as well as the images below.

Tables should communicate, but instead they are used as a dump of tabular data, which the audience is supposed to  navigate through, understand and make sense of. Oh yeah, all of that in a couple of minutes.

Let's dive in. Before considering showing a table at a talk, ask yourself, "so what?". Does it support your point?  Does it prove someone's else point wrong? You might want to write down 2 or 3 questions that the audience should be available to answer after you have shown and commented the table. If you can't think of any question, or if they sound stupid to you, drop the table, because it doesn't move your talk forward.  After you have done with the table, ask another set of questions about the retrieval of information in the table. Let's look at the example of Wainer.

  Set the clock to 90 seconds. Go!
  • What are the principal causes of accidental death? 
  • Which are the most frequent? Which the least frequent?
  • Are there any unusual interactions between country and cause of accidental death?
  • How do the countries differ with respect to their respective rates of accidental death?
 After 4 iterations Wainer present us this improved version

What Wainer has done is to highlight the data by partly reducing the non-data ink and enhancing the data ink.  In other words Wainer must have asked himself
"Would the data suffer any loss of meaning or impact if this were eliminated?"
— Stephen Few, author of Show Me the Numbers.
and where the answer was no, he got rid of it.

 In addition to improving the data ink in the table, Wainer has 
  • reordered the rows and columns in a way that makes sense to the audience
  • added  statistics that summarize the data
  • clustered the data
  • and, finally, rounded the figures.
In the coming posts I'll be going to these points and others in more detailed, so that hopeful getting information from a table is like opening a can with a Swiss Knife.