Thanks to @kwinkunks for the tip about this post
RELATED POSTS (MyCarta)
The rainbow is dead…long live the rainbow! – Part 1 —
The rainbow is dead…long live the rainbow! – Part 2: a rainbow puzzle —
The rainbow is dead…long live the rainbow! – Part 1 —
The rainbow is dead…long live the rainbow! – Part 2: a rainbow puzzle —
This is the first post in a series on the rainbow and similar color palettes. My goal is to demonstrate it is not a good idea to use these palettes to display scientific data, and then answer these two questions: (1) is there anything we can do to “fix” the rainbow, and (2) if not, can we design a new one from scratch.
In a previous post I showed a pseudo-3D rendering of my left hand x-ray using intensity (which is a measure of bone thickness) as the elevation. I mapped the rendering to both grayscale and rainbow color palettes, and here I reproduced the two images side by side:
I used this example to argue (briefly) that the rainbow obscures some details and confuses images by introducing artifacts. Notice that in this case it clearly reduces the effectiveness of the pseudo-3D rendering in general. It also introduces inversions in the perception of elevation. The thick part in the head of the radius bone, indicated by the arrow, looks like a depression, whereas it is clearly (and correctly) a high in the grayscale version.
In my last post I described how to create a powerful, nondirectional shading for a geophysical surface using the slope of the data to assign the shading intensity (i.e. areas of greater slope are assigned darker shading). Today I will show hot to create a similar effect in Matlab.
Since the data set I use is from my unpublished thesis in Geology, I am not able to share it, and you will have to use your own data, but the Matlab code is simply adapted. The code snippets below assume you have a geophysical surface already imported in the workspace and stored in a variable called “data”, as well as the derivative in a variable called “data_slope”.
Some time ago I read this interesting Image Processing blog post by Steve Eddins at Mathworks on overlaying images using transparency. I encourage readers to take a look at this and other posts by Steve, he’s great! That particular blog post gave me the idea to use transparency and the slope to create my favorite shading in Matlab.
In addition to the code below you will need normalise.m from Peter Kovesi‘s website, and to import the color palette cube1.
%% alpha transparency code snippet black = cat(3, zeros(size(data)), zeros(size(data)), ... zeros(size(data))); % make a truecolor all-black image gray=black+0.2; % make a truecolor all-gray image alphaI=normalise(data_slope); % create transparency weight matrix % using data_slope imagesc(data);colormap(cube1); % display data hold on h = imagesc(gray); % overlay gray image on data hold off set(h, 'AlphaData', alphaI); % set transparency of gray layer using axis equal; % weight matrix axis tight; axis off;
And here is the result in Figure 1 below – not bad!
Figure 1. Shaded using transparency
I love a visualization well done, whether by me or someone else. In fact, I love visualization period. I find there’s always something to learn by looking at an image or animation, and always look for something new and interesting I can learn.
Today I would like to share with readers some of the things I learned, saw, or admired over time.
Yes, we all know nowadays how to use Google Earth to plan our next vacation, check our old neighbor’s new house, etcetera. But visualization? Yes indeed. Just today I was at a roundtable meeting of Fig Tree members (Fig Tree is an NGO that supports international development projects) and I learned how Google Earth is used by many NGOs for project planning: for a start check the Mercy Corps‘ Rough Google Earth Guide, these map overlay tools, and the official gallery.
Here’s a tutorial on annotating Google Earth:
and some beautiful visualizations created using Matlab in conjunction with Google Earth.
There are scores of great books on visualization. I introduce two I really like in my more recent post Two great visualization books. Reader Ron DeSpain mentioned these free online courses in a comment: Introduction to Infographics and Data Visualization, by Roberto Cairo, which is also the author of The functional art, a blog and a book, and Information Visualization MOOC, by Katy Börner and colleagues at the University of Indiana.
Specialize in one discipline if you can. See what the experts in that field do. For example I am a Geophysicist and do a lot of seismic visualization and interpretation, so I look at what folks like Steve Lynch, or Art Barnes to name a couple, and follow Agile Geoscience blog. Again, keep abreast of the latest technology: Google Earth is increasingly being used in seismic exploration planning and visualization. You can find some examples here and even get some seismic overlays and display them yourself: if you have Google Earth just download this KMZ file and double-click.
I am also always curious about other fields and browse for examples incessantly. I am interested in music, and I was thrilled to find this great review of Music Visualization. I am also interested in Astronomy and Planetary Exploration, and over time I have found some amazing visualizations. This video for instance is a volume rendered animation of the star-forming region L1448 created by Nick Holliman (Durham University) in VolView, an open source volume visualization program.
Credits: Harvard Astronomical Medicine Project
Just recently I found on Visurus a time-lapse (1950 -2011) geocentric map of the visible universe.
A while back I learned a lot on from books like A Beginner’s Guide to Constructing the Universe, and its exploration of the relationships between nature, art, science, symbols, and numbers; I regularly go back to it.
Look for synergies and collaborations. Here’s what can happen when you put together a geologist and a design expert:
Check answers on sites like Quora or Stack Overflow. Check regularly or better subscribe to visualization or specialistic blogs: I mentioned already VizThink and Fell in Love with Data. I also like the excellent Datavisualization.ch and FlowingData, where you can actually find an extensive list of blogs.
Take a look at the groundbreaking work of Hans Roslins with his Gapminder:
Check this video on Designing for Visual Efficiency from Vizthink to learn how to declutter your visualizations:
Ignite Toronto 2: Ryan Coleman – Designing for visual efficiency at Ignite Toronto on Vimeo.
and this one on Journalism in the age of data:
Journalism in the Age of Data from Geoff McGhee on Vimeo.
Here’s an interesting visualization project from IMB: sign up on Many Eyes to not only browse several examples of visualizations but also to upload your own data and outsource the visualization project.
A subject I think is particularly important is how to use color in your presentations and visualizations. Use color sparingly and sensibly, and ad hoc. Know about color deficiencies and confusing color schemes and the difference a perceptually appropriate colormap can do. With Vischeck, Color Oracle, and Dichromacy you can simulate how people with different color vision deficiencies will see your images and decide if you need a different colormap; for two color contrast for presentations, webpages, diagrams, use the Accessibility Color Wheel. Select colormaps according to task, and avoid artifacts when using color blending. Reduce the hue range when possible and choose it based on the concept of color harmonization. After all, the hue circle isn’t really circular at all and contains non-spectral colors (purple). You can design harmonious schemes with Color Wheel Pro, and check the palettes’ mood using Colour monitor, a wonderful tool by Richard Weeler. Avoid at all costs rainbow and similar color palettes.
Finally, A fantastic resource on color: References and Resources for Visualization Professionals by by Robert Simmon at NASA’s Earth Observatory
Thanks to this technology you can now build interactive applications with seamless dynamic zooming. Look at Steve Lynch’s seismic visualization built using MS Silverlight, and Well Visualization in Prezi by Evan Bianco.
The best tools are your brain and your hand. Draw and sketch a lot. Concept maps are a great tool for brainstorming and tinkering with ideas, whether on paper or your computer; check NASA’s Mars Exploration Concept Map. Finally, I strongly encourage you to read Experiences in Visual Thinking.
Read The Data Visualization Beginner’s Toolkit series from Fell in Love with Data blog. This is the introduction to the series. In the first post he reviews books and other resources. In the second post he introduces some rules and more importantly the software tools. There’s a feature interview with Moritz Stefaner on data visualization freelancing:
Interview: Moritz Stefaner on Data Visualization Freelancing from FILWD on Vimeo.
And if you are intimidated by having to pick up programming skills, he has a post that is just right for you.
It should go without saying, but unfortunately it does not: if data are sensitive, don’t forget about privacy.
visualisingdata’s essential collection of visualisation resources
Visualization Tools & Resources
How to avoid equidistant HSV colors
Color Oracle – color vision deficiency simulation – stand alone (Window, Mac and Linux)
Dichromacy – color vision deficiency simulation – open source plugin for ImageJ
Vischeck – color vision deficiency simulation – plugin for ImageJ and Photoshop (Windows and Linux)