c3200 02
c3200 02
IN THIS CHAPTER 2.1 WHY VISUALIZE? 2.2 CHARACTERISTICS OF GOOD DATA VISUALIZATION 2.3 DATA QUANTITY AND DIMENSION 2.4 COLOR, LIGHT, AND SHADING 2.5 MOTION 2.6 INTERACTION
2.1
Why Visualize?
The obvious question that is at the heart of MATLAB graphics is Why would I ever want to visualize my data? At its very essence, science is the quest for truth. However, some of those truths are not easily discovered, and in many cases, we dont even know how to ask the appropriate questions that will lead to the truth. Consider the fact that many natural phenomena are too fast, too slow, too large, or too small to be studied through direct observation or with traditional laboratory techniques. How can we see the unseen or gain enough insight into the nature of things to even know what is worthwhile to investigate? Also, consider that everything humankind has made and every fact that has been discovered were first birthed as an idea, i.e., something with form only in the minds eye. We revere those who can see beyond the apparent and call them visionary. A dictionary will tell us that to visualize means, To form a mental image or vision of. Therefore, when we discuss what it means to visualize something with MATLAB or with anything else for that matter, we need to be aware of the significant role the mind plays in this discussion. However, this is a book about MATLAB, not about philosophy, but it is important that you realize that what we are really exploring in this book are ways to represent something, whether that something is a graphical representation of a real-world object, a hypothetical mathematical construct, or specific values of some measurable quantities. Most importantly, we want to create those representations in such a way that the human mind can understand them and then ask the right questions that lead to the discovery of new things or to a better understanding of our universe. So why do you need visualization? Aside from making your boss look good to his superiors, the visualization of your data can help you identify and emphasize areas of interest, such as where significant events occur, or where the data exhibits a curious behavior. It can also help you to convey your thoughts, observations, or conclusions to others in a quick and intuitive way. There are probably as many applications for MATLAB as there are users of it, and every application will have its own special needs, but even amongst all that, a little understanding of some scientific visualization fundamentals will
2003 by CRC Press LLC
help you achieve the results you desire. Table 2.1.1 lists some of the reasons to visualize your data.
Table 2.1.1 Reasons to Visualize Data Explore it Emphasize some aspect of it Gain new insights into it See the invisible Publish it Exploit it Analyze it Assess or control the quality of it Present it Interact with it
One can easily argue that the need to visualize data and information has, largely, driven our technology. The entire field of computer graphics, which includes hardware and software, is devoted to furthering the science of how we represent and interact with information in effective ways.
2.2
MATLAB has established itself as a preeminent computing environment. By computing environment we mean that not only does MATLAB provide the user with quick access to many data processing functions, but also allows a MATLAB programmer to create special purpose applications to be used by domain specialists. These domain specialists are often not interested in knowing the intricacies of MATLAB programming, but are very interested in having analytical tools that are intuitive to use and in which they can have confidence. Since you are reading this book, you either have a need for visualizing some of your own data, or you are involved in developing some form of graphical user interface, either for your own analytical efforts, or to support some domain specialists who really dont want to be programmers. In Chapter 10 we will discuss the essential elements of GUI design. Here we will consider how to better represent data and results so that the salient aspects of the information contained in the data can be readily observed. In Table 2.1.1 we listed some reasons why you would want to visualize data. Remember, the basic reason for visualization is to help you, or those you work with, solve problems. Cognitive psychologists have demonstrated that the way in which a problem is presented can determine how difficult a problem is to solve, so we re-present the problem in more understandable, i.e., intuitive, ways and in doing so gain insight. Good visualizations must be meaningful; every plotted point, and each colored line needs to help with the intuitive understanding. This leads to issues of perception, and since visualization in the scope of this book is visual, we are talking about visual perception. This idea of perception has to be distinguished according to two primary areas of intent: 1) the display and communication of data, and 2) the investigation and understanding of data. The direction with which you are approaching your problem will determine largely the manner in which you visualize your data. A good visualization should distill the vast quantity of data, or the difficult-to-understand concept, into quantities and terms that are readily understandable. It is by comparison to what we know that we discover what we dont know. It is much easier to see an anomalous
spike in data when it is plotted, as opposed to looking at a list of numbers on a printout. The modern scientific world is not a simple world. We have developed the scientific tools we have in order to investigate and communicate in unambiguous terms. In this communication, we must strive for clarity, precision, and efficiency. Table 2.2.1 lists some characteristics of good data visualizations.
Table 2.2.1 Characteristics of Good Visualizations
A Good Visualization Should Serve a clear purpose. Show the data without distorting it.
Because We are interested in describing, exploring, or recording something. The data is what is important, or more fundamentally, the truth the data reveals. Understanding will be sacrificed if graphic design, or some other flashy mechanism draws attention away from the content. We are often overwhelmed by many numbers; we need to make large data sets coherent. It is easy for us to see relative differences. It is easier to understand the bigger picture when the details are available to support it.
of
Take advantage of the natural tendency to make visual comparisons. Reveal information levels of detail. at various
2.3
Advances in technology are allowing us to gather data at an ever-increasing rate. Microphones, video cameras, telescopes, satellites, radars, etc., work round the clock gathering more data about the universe around us. X-rays, ultrasound, computed tomography, magnetic resonance images, etc., are likewise gathering more data about the universe within us. From the immensity of the universe probed with radio telescopes, to the minutiae within molecules observed with electron microscopes, we are witnessing a massive flood of